From 3d73b30b56733194e27bb376cd53755c88eb97a4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 4 Sep 2019 00:23:11 +0200 Subject: [PATCH] Fix recently broken AUI layout The changes of 5873ee7e4aff4471c95889aad7d47f28cb13deb9 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. --- src/common/toplvcmn.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/toplvcmn.cpp b/src/common/toplvcmn.cpp index 01211ce7c0..0dc35173d1 100644 --- a/src/common/toplvcmn.cpp +++ b/src/common/toplvcmn.cpp @@ -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(); }