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.
This commit is contained in:
Vadim Zeitlin
2018-05-13 02:33:05 +02:00
parent 2e5554019a
commit 6cdd564237

View File

@@ -702,7 +702,18 @@ bool wxAuiMDIChildFrame::Show(bool show)
{ {
m_activateOnCreate = 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; return true;
} }