From f534d7b8d74b9e35b8b58a2a9c03a5187a34f759 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Mon, 17 Jun 2019 11:00:57 -0400 Subject: [PATCH] ReCreateSliders doesn't need a parent window --- src/TrackPanel.cpp | 18 +++++++++--------- src/TrackPanel.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index 9524afdcc..a44bf3d33 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -277,7 +277,7 @@ TrackPanel::TrackPanel(wxWindow * parent, wxWindowID id, #pragma warning( default: 4355 ) #endif { - TrackInfo::ReCreateSliders( this ); + TrackInfo::ReCreateSliders(); TrackInfo::UpdatePrefs( this ); SetLayoutDirection(wxLayout_LeftToRight); @@ -385,7 +385,7 @@ void TrackPanel::UpdatePrefs() void TrackPanel::ApplyUpdatedTheme() { - TrackInfo::ReCreateSliders( this ); + TrackInfo::ReCreateSliders(); } @@ -2430,20 +2430,20 @@ std::unique_ptr } -void TrackInfo::ReCreateSliders( wxWindow *pParent ){ +void TrackInfo::ReCreateSliders(){ const wxPoint point{ 0, 0 }; wxRect sliderRect; GetGainRect(point, sliderRect); float defPos = 1.0; /* i18n-hint: Title of the Gain slider, used to adjust the volume */ - gGain = std::make_unique(pParent, _("Gain"), + gGain = std::make_unique(nullptr, _("Gain"), wxPoint(sliderRect.x, sliderRect.y), wxSize(sliderRect.width, sliderRect.height), DB_SLIDER); gGain->SetDefaultValue(defPos); - gGainCaptured = std::make_unique(pParent, _("Gain"), + gGainCaptured = std::make_unique(nullptr, _("Gain"), wxPoint(sliderRect.x, sliderRect.y), wxSize(sliderRect.width, sliderRect.height), DB_SLIDER); @@ -2453,13 +2453,13 @@ void TrackInfo::ReCreateSliders( wxWindow *pParent ){ defPos = 0.0; /* i18n-hint: Title of the Pan slider, used to move the sound left or right */ - gPan = std::make_unique(pParent, _("Pan"), + gPan = std::make_unique(nullptr, _("Pan"), wxPoint(sliderRect.x, sliderRect.y), wxSize(sliderRect.width, sliderRect.height), PAN_SLIDER); gPan->SetDefaultValue(defPos); - gPanCaptured = std::make_unique(pParent, _("Pan"), + gPanCaptured = std::make_unique(nullptr, _("Pan"), wxPoint(sliderRect.x, sliderRect.y), wxSize(sliderRect.width, sliderRect.height), PAN_SLIDER); @@ -2469,12 +2469,12 @@ void TrackInfo::ReCreateSliders( wxWindow *pParent ){ GetVelocityRect(point, sliderRect); /* i18n-hint: Title of the Velocity slider, used to adjust the volume of note tracks */ - gVelocity = std::make_unique(pParent, _("Velocity"), + gVelocity = std::make_unique(nullptr, _("Velocity"), wxPoint(sliderRect.x, sliderRect.y), wxSize(sliderRect.width, sliderRect.height), VEL_SLIDER); gVelocity->SetDefaultValue(0.0); - gVelocityCaptured = std::make_unique(pParent, _("Velocity"), + gVelocityCaptured = std::make_unique(nullptr, _("Velocity"), wxPoint(sliderRect.x, sliderRect.y), wxSize(sliderRect.width, sliderRect.height), VEL_SLIDER); diff --git a/src/TrackPanel.h b/src/TrackPanel.h index b3e5ab8b1..52a6a37a5 100644 --- a/src/TrackPanel.h +++ b/src/TrackPanel.h @@ -63,7 +63,7 @@ enum { namespace TrackInfo { - void ReCreateSliders( wxWindow *pParent ); + void ReCreateSliders(); unsigned MinimumTrackHeight();