Fix recently broken AUI layout
The changes of 5873ee7e4a
completely broke
AUI layout as wxAUI code relies on Layout() still performing the layout
even when GetAutoLayout() returns false, but the new wxTLW::Layout()
didn't do anything in this case.
Fix the problem by checking whether we have a sizer or constraints in
this function instead of using GetAutoLayout(), which is supposed to
only be used by wxEVT_SIZE handler to determine if Layout() should be
called in the first place, but not by Layout() itself.
Closes #18486.
This commit is contained in:
@@ -421,8 +421,8 @@ bool wxTopLevelWindowBase::Layout()
|
||||
return false;
|
||||
|
||||
|
||||
// if we're using constraints or sizers - do use them
|
||||
if ( GetAutoLayout() )
|
||||
// if we're using sizers or constraints - do use them
|
||||
if ( GetSizer() || GetConstraints() )
|
||||
{
|
||||
return wxNonOwnedWindow::Layout();
|
||||
}
|
||||
|
Reference in New Issue
Block a user