Improve compatibility after wxTopLevelWindow::Layout() change

The changes of 3241e7a850 resulted in
Layout() not called any longer from wxEVT_SIZE handler for windows that
didn't use neither sizers nor constraints themselves, but did call
SetAutoLayout(true).

Fix this regression by checking for GetAutoLayout() explicitly.

See #18472.
This commit is contained in:
Vadim Zeitlin
2019-11-04 19:32:10 +01:00
parent e19e9bce79
commit 8d1aae5443

View File

@@ -422,7 +422,8 @@ bool wxTopLevelWindowBase::Layout()
// if we're using sizers or constraints - do use them
if ( GetSizer()
if ( GetAutoLayout()
|| GetSizer()
#if wxUSE_CONSTRAINTS
|| GetConstraints()
#endif