From 6cdd564237b9ac419d20634e52da849d605deb2f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 13 May 2018 02:33:05 +0200 Subject: [PATCH] Redo layout from wxAuiMDIChildFrame::Show() This makes using this class more similar to using wxMDIChildFrame and fixes the initial appearance of docview sample child windows in AUI mode. --- src/aui/tabmdi.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/aui/tabmdi.cpp b/src/aui/tabmdi.cpp index 86e7887ecf..0d2450c65f 100644 --- a/src/aui/tabmdi.cpp +++ b/src/aui/tabmdi.cpp @@ -702,7 +702,18 @@ bool wxAuiMDIChildFrame::Show(bool show) { m_activateOnCreate = show; - // do nothing + if ( show ) + { + // This is not a real TLW, so it won't get a size event when it's + // really "mapped", i.e. appears on the screen for the first time. + // Instead, its size had been already set when it was created and we + // didn't have any opportunity to lay it out since then, i.e. since + // before its children were created. Do it now to allow the same code + // that would work with a "real" wxMDIChildFrame to also work with this + // class. + DoLayout(); + } + return true; }