From 0b160faecce715a460966a1a3c58e383cf9cab61 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Thu, 28 Mar 2019 11:55:54 -0400 Subject: [PATCH] Fix more cases of controls in static boxes that don't use ShuttleGui... ... as in commit f7644c7 --- src/Screenshot.cpp | 5 ++--- src/TimeDialog.cpp | 2 +- src/effects/Contrast.cpp | 8 ++++---- src/prefs/KeyConfigPrefs.cpp | 8 ++++---- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/Screenshot.cpp b/src/Screenshot.cpp index 4ee3437e5..6b25a2b06 100644 --- a/src/Screenshot.cpp +++ b/src/Screenshot.cpp @@ -338,14 +338,13 @@ void ScreenFrame::PopulateOrExchange(ShuttleGui & S) S.Id(IdMainWindowLarge).AddButton(_("Resize Large")); /* i18n-hint: Bkgnd is short for background and appears on a small button * It is OK to just translate this item as if it said 'Blue' */ - wxASSERT(p); // To justify safenew - mBlue = safenew wxToggleButton(p, + mBlue = safenew wxToggleButton(S.GetParent(), IdToggleBackgroundBlue, _("Blue Bkgnd")); S.AddWindow(mBlue); /* i18n-hint: Bkgnd is short for background and appears on a small button * It is OK to just translate this item as if it said 'White' */ - mWhite = safenew wxToggleButton(p, + mWhite = safenew wxToggleButton(S.GetParent(), IdToggleBackgroundWhite, _("White Bkgnd")); S.AddWindow(mWhite); diff --git a/src/TimeDialog.cpp b/src/TimeDialog.cpp index 2f5d19243..ef857a0c0 100644 --- a/src/TimeDialog.cpp +++ b/src/TimeDialog.cpp @@ -55,7 +55,7 @@ void TimeDialog::PopulateOrExchange(ShuttleGui &S) { mTimeCtrl = safenew NumericTextCtrl( - this, wxID_ANY, + S.GetParent(), wxID_ANY, NumericConverter::TIME, mFormat, mTime, diff --git a/src/effects/Contrast.cpp b/src/effects/Contrast.cpp index a0144e844..f2836118a 100644 --- a/src/effects/Contrast.cpp +++ b/src/effects/Contrast.cpp @@ -224,7 +224,7 @@ ContrastDialog::ContrastDialog(wxWindow * parent, wxWindowID id, if (S.GetMode() == eIsCreating) { mForegroundStartT = safenew - NumericTextCtrl(this, ID_FOREGROUNDSTART_T, + NumericTextCtrl(S.GetParent(), ID_FOREGROUNDSTART_T, NumericConverter::TIME, NumericConverter::HundredthsFormat(), 0.0, @@ -237,7 +237,7 @@ ContrastDialog::ContrastDialog(wxWindow * parent, wxWindowID id, if (S.GetMode() == eIsCreating) { mForegroundEndT = safenew - NumericTextCtrl(this, ID_FOREGROUNDEND_T, + NumericTextCtrl(S.GetParent(), ID_FOREGROUNDEND_T, NumericConverter::TIME, NumericConverter::HundredthsFormat(), 0.0, @@ -256,7 +256,7 @@ ContrastDialog::ContrastDialog(wxWindow * parent, wxWindowID id, if (S.GetMode() == eIsCreating) { mBackgroundStartT = safenew - NumericTextCtrl(this, ID_BACKGROUNDSTART_T, + NumericTextCtrl(S.GetParent(), ID_BACKGROUNDSTART_T, NumericConverter::TIME, NumericConverter::HundredthsFormat(), 0.0, @@ -269,7 +269,7 @@ ContrastDialog::ContrastDialog(wxWindow * parent, wxWindowID id, if (S.GetMode() == eIsCreating) { mBackgroundEndT = safenew - NumericTextCtrl(this, ID_BACKGROUNDEND_T, + NumericTextCtrl(S.GetParent(), ID_BACKGROUNDEND_T, NumericConverter::TIME, NumericConverter::HundredthsFormat(), 0.0, diff --git a/src/prefs/KeyConfigPrefs.cpp b/src/prefs/KeyConfigPrefs.cpp index c95d3a9a6..c26a13c2b 100644 --- a/src/prefs/KeyConfigPrefs.cpp +++ b/src/prefs/KeyConfigPrefs.cpp @@ -150,7 +150,7 @@ void KeyConfigPrefs::PopulateOrExchange(ShuttleGui & S) { S.SetBorder(2); - wxStaticBox* staticBox = S.StartStatic(_("Key Bindings"), 1); + S.StartStatic(_("Key Bindings"), 1); { S.StartMultiColumn(3, wxEXPAND); { @@ -189,7 +189,7 @@ void KeyConfigPrefs::PopulateOrExchange(ShuttleGui & S) mFilterLabel = S.AddVariableText(_("Searc&h:")); if (!mFilter) { - mFilter = safenew wxTextCtrl(staticBox, + mFilter = safenew wxTextCtrl(S.GetParent(), FilterID, wxT(""), wxDefaultPosition, @@ -217,7 +217,7 @@ void KeyConfigPrefs::PopulateOrExchange(ShuttleGui & S) S.StartHorizontalLay(wxEXPAND, 1); { if (!mView) { - mView = safenew KeyView(staticBox, CommandsListID); + mView = safenew KeyView(S.GetParent(), CommandsListID); mView->SetName(_("Bindings")); } S.Prop(true); @@ -228,7 +228,7 @@ void KeyConfigPrefs::PopulateOrExchange(ShuttleGui & S) S.StartThreeColumn(); { if (!mKey) { - mKey = safenew wxTextCtrl(staticBox, + mKey = safenew wxTextCtrl(S.GetParent(), CurrentComboID, wxT(""), wxDefaultPosition,