Remove unnecessary SetAutoLayout(true) calls

There is no need to call SetAutoLayout() explicitly after (or just
before) calling SetSizer() with a valid sizer pointer, as SetSizer()
already enables automatic layout, so just drop the useless calls.

No real changes.
This commit is contained in:
Vadim Zeitlin 2022-02-19 15:08:12 +01:00
parent d4909ffd07
commit a83fff2902
12 changed files with 0 additions and 14 deletions

View File

@ -1764,7 +1764,6 @@ void wxPreviewFrame::InitializeWithModality(wxPreviewFrameModalityKind kind)
sizer->Add( m_controlBar, wxSizerFlags().Expand().Border() );
sizer->Add( m_previewCanvas, wxSizerFlags(1).Expand().Border() );
SetAutoLayout( true );
SetSizer( sizer );
m_modalityKind = kind;

View File

@ -392,7 +392,6 @@ void wxGenericColourDialog::CreateWidgets()
topSizer->Add(buttonsizer, wxSizerFlags().Expand().DoubleBorder());
}
SetAutoLayout( true );
SetSizer( topSizer );
topSizer->SetSizeHints( this );

View File

@ -157,7 +157,6 @@ bool wxGenericDirDialog::Create(wxWindow* parent,
m_input->SetFocus();
SetAutoLayout( true );
SetSizer( topsizer );
topsizer->SetSizeHints( this );

View File

@ -204,7 +204,6 @@ bool wxGenericFindReplaceDialog::Create(wxWindow *parent,
if ( style & wxFR_NOUPDOWN)
m_radioDir->Enable(false);
SetAutoLayout( true );
SetSizer( topsizer );
topsizer->SetSizeHints( this );

View File

@ -985,7 +985,6 @@ bool wxGenericFileCtrl::Create( wxWindow *parent,
SetWildcard( wildCard );
SetAutoLayout( true );
SetSizer( mainsizer );
if ( !is_pda )

View File

@ -354,7 +354,6 @@ void wxGenericFontDialog::CreateWidgets()
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
this->SetSizer(itemBoxSizer2);
this->SetAutoLayout(true);
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer3, 1, wxGROW|wxALL, 5);

View File

@ -217,7 +217,6 @@ void wxGenericMessageDialog::DoCreateMsgdialog()
if ( sizerBtn )
topsizer->Add(sizerBtn, 0, wxEXPAND | wxALL, 10 );
SetAutoLayout( true );
SetSizer( topsizer );
topsizer->SetSizeHints( this );

View File

@ -120,7 +120,6 @@ bool wxNumberEntryDialog::Create(wxWindow *parent,
}
SetSizer( topsizer );
SetAutoLayout( true );
topsizer->SetSizeHints( this );
topsizer->Fit( this );

View File

@ -249,7 +249,6 @@ void wxGenericPrintDialog::Init(wxWindow * WXUNUSED(parent))
if ( sizerBtn )
mainsizer->Add(sizerBtn, 0, wxEXPAND|wxALL, 10 );
SetAutoLayout( true );
SetSizer( mainsizer );
mainsizer->Fit( this );
@ -659,7 +658,6 @@ void wxGenericPrintSetupDialog::Init(wxPrintData* data)
main_sizer->Add( CreateButtonSizer( wxOK|wxCANCEL), 0, wxEXPAND|wxALL, 10 );
SetAutoLayout( true );
SetSizer( main_sizer );
main_sizer->Fit( this );
@ -921,7 +919,6 @@ wxGenericPageSetupDialog::wxGenericPageSetupDialog( wxWindow *parent,
mainsizer->Add( buttonsizer, 0, wxEXPAND|wxALL, 10 );
SetAutoLayout( true );
SetSizer( mainsizer );
mainsizer->Fit( this );

View File

@ -115,7 +115,6 @@ bool wxTextEntryDialog::Create(wxWindow *parent,
topsizer->Add(buttonSizer, wxSizerFlags(flagsBorder2).Expand());
}
SetAutoLayout( true );
SetSizer( topsizer );
topsizer->SetSizeHints( this );

View File

@ -74,7 +74,6 @@ bool wxHtmlHelpDialog::Create(wxWindow* parent, wxWindowID id,
wxWindow* item1 = this;
wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
item1->SetSizer(item2);
item1->SetAutoLayout(true);
wxWindow* item3 = m_HtmlHelpWin;
item2->Add(item3, 1, wxGROW|wxALL, 5);

View File

@ -326,7 +326,6 @@ bool wxHtmlHelpWindow::Create(wxWindow* parent, wxWindowID id,
// The sizer for the whole top-level window.
wxSizer *topWindowSizer = new wxBoxSizer(wxVERTICAL);
SetSizer(topWindowSizer);
SetAutoLayout(true);
#if wxUSE_TOOLBAR
// toolbar?