From 30d375d6faab4d0487d6ba8fe7e55a0d4cdc9213 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Sun, 17 Nov 2019 21:24:01 -0500 Subject: [PATCH] Remove style argument from ShuttleGui::AddCombo & AddListBox... ... use the Style() chain-call instead, as needed --- src/ShuttleGui.cpp | 8 ++++---- src/ShuttleGui.h | 4 ++-- src/effects/Effect.cpp | 4 +++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/ShuttleGui.cpp b/src/ShuttleGui.cpp index 4e9f8db40..824ef7b2f 100644 --- a/src/ShuttleGui.cpp +++ b/src/ShuttleGui.cpp @@ -466,7 +466,7 @@ wxStaticText * ShuttleGuiBase::AddVariableText(const wxString &Str, bool bCenter return pStatic; } -wxComboBox * ShuttleGuiBase::AddCombo( const wxString &Prompt, const wxString &Selected,const wxArrayStringEx & choices, long style ) +wxComboBox * ShuttleGuiBase::AddCombo( const wxString &Prompt, const wxString &Selected,const wxArrayStringEx & choices ) { HandleOptionality( Prompt ); AddPrompt( Prompt ); @@ -486,7 +486,7 @@ wxComboBox * ShuttleGuiBase::AddCombo( const wxString &Prompt, const wxString &S } mpWind = pCombo = safenew wxComboBox(GetParent(), miId, Selected, wxDefaultPosition, wxDefaultSize, - n, Choices, GetStyle( style )); + n, Choices, GetStyle( 0 )); mpWind->SetName(wxStripMenuCodes(Prompt)); UpdateSizers(); @@ -683,7 +683,7 @@ void ShuttleGuiBase::AddConstTextBox(const wxString &Prompt, const wxString &Val UpdateSizers(); } -wxListBox * ShuttleGuiBase::AddListBox(const wxArrayStringEx &choices, long style) +wxListBox * ShuttleGuiBase::AddListBox(const wxArrayStringEx &choices) { UseUpId(); if( mShuttleMode != eIsCreating ) @@ -691,7 +691,7 @@ wxListBox * ShuttleGuiBase::AddListBox(const wxArrayStringEx &choices, long styl wxListBox * pListBox; SetProportions( 1 ); mpWind = pListBox = safenew wxListBox(GetParent(), miId, - wxDefaultPosition, wxDefaultSize, choices, style); + wxDefaultPosition, wxDefaultSize, choices, GetStyle(0)); pListBox->SetMinSize( wxSize( 120,150 )); UpdateSizers(); return pListBox; diff --git a/src/ShuttleGui.h b/src/ShuttleGui.h index ef5300153..76c8b4be8 100644 --- a/src/ShuttleGui.h +++ b/src/ShuttleGui.h @@ -223,7 +223,7 @@ public: wxTextCtrl * AddTextBox(const wxString &Caption, const wxString &Value, const int nChars); wxTextCtrl * AddNumericTextBox(const wxString &Caption, const wxString &Value, const int nChars); wxTextCtrl * AddTextWindow(const wxString &Value); - wxListBox * AddListBox(const wxArrayStringEx &choices, long style = 0); + wxListBox * AddListBox(const wxArrayStringEx &choices); struct ListControlColumn{ ListControlColumn( @@ -247,7 +247,7 @@ public: wxGrid * AddGrid(); wxCheckBox * AddCheckBox( const wxString &Prompt, bool Selected); wxCheckBox * AddCheckBoxOnRight( const wxString &Prompt, bool Selected); - wxComboBox * AddCombo( const wxString &Prompt, const wxString &Selected,const wxArrayStringEx & choices, long style = 0 ); + wxComboBox * AddCombo( const wxString &Prompt, const wxString &Selected,const wxArrayStringEx & choices ); wxChoice * AddChoice( const wxString &Prompt, const wxArrayStringEx &choices, int Selected = -1 ); wxChoice * AddChoice( const wxString &Prompt, diff --git a/src/effects/Effect.cpp b/src/effects/Effect.cpp index 0b7db0328..e641b4688 100644 --- a/src/effects/Effect.cpp +++ b/src/effects/Effect.cpp @@ -3753,7 +3753,9 @@ EffectPresetsDialog::EffectPresetsDialog(wxWindow *parent, Effect *effect) mType = S.Id(ID_Type).AddChoice( {}, {}, 0 ); S.AddPrompt(_("&Preset:")); - mPresets = S.AddListBox( {}, wxLB_SINGLE | wxLB_NEEDED_SB ); + mPresets = S + .Style( wxLB_SINGLE | wxLB_NEEDED_SB ) + .AddListBox( {} ); } S.EndTwoColumn();