Call wxTopLevelWindow::Layout() rather than DoLayout()

Ideal would be to completely get rid of the DoLayout() method later,
however this method seems to be used in the existing applications, so
for now it needs to be kept.
This commit is contained in:
Vadim Zeitlin
2019-08-22 13:48:07 +02:00
parent 3241e7a850
commit c74a15eded
2 changed files with 5 additions and 5 deletions

View File

@@ -465,7 +465,7 @@ void wxFrameBase::SetStatusBar(wxStatusBar *statBar)
{ {
PositionStatusBar(); PositionStatusBar();
DoLayout(); Layout();
} }
} }
@@ -597,19 +597,19 @@ void wxFrameBase::SetToolBar(wxToolBar *toolbar)
m_frameToolBar = toolbar; m_frameToolBar = toolbar;
PositionToolBar(); PositionToolBar();
} }
//else: tricky: do not reset m_frameToolBar yet as otherwise DoLayout() //else: tricky: do not reset m_frameToolBar yet as otherwise Layout()
// wouldn't recognize the (still existing) toolbar as one of our // wouldn't recognize the (still existing) toolbar as one of our
// bars and wouldn't layout the single child of the frame correctly // bars and wouldn't layout the single child of the frame correctly
// and this is even more tricky: we want DoLayout() to recognize the // and this is even more tricky: we want Layout() to recognize the
// old toolbar for the purpose of not counting it among our non-bar // old toolbar for the purpose of not counting it among our non-bar
// children but we don't want to reserve any more space for it so we // children but we don't want to reserve any more space for it so we
// temporarily hide it // temporarily hide it
if ( m_frameToolBar ) if ( m_frameToolBar )
m_frameToolBar->Hide(); m_frameToolBar->Hide();
DoLayout(); Layout();
if ( m_frameToolBar ) if ( m_frameToolBar )
m_frameToolBar->Show(); m_frameToolBar->Show();

View File

@@ -929,7 +929,7 @@ bool wxWizard::DoLayoutAdaptation()
wxStandardDialogLayoutAdapter::DoFitWithScrolling(this, windows); wxStandardDialogLayoutAdapter::DoFitWithScrolling(this, windows);
// Size event doesn't get sent soon enough on wxGTK // Size event doesn't get sent soon enough on wxGTK
DoLayout(); Layout();
SetLayoutAdaptationDone(true); SetLayoutAdaptationDone(true);