From ce31c371b9c109b983dcba5812211e3876c76d4b Mon Sep 17 00:00:00 2001 From: James Crook Date: Thu, 20 Sep 2018 14:33:19 +0100 Subject: [PATCH] Bug 1983 residual - Width of mixer toolbar changes. --- src/toolbars/MixerToolBar.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/toolbars/MixerToolBar.cpp b/src/toolbars/MixerToolBar.cpp index bd68eeb23..3e8f7bbf7 100644 --- a/src/toolbars/MixerToolBar.cpp +++ b/src/toolbars/MixerToolBar.cpp @@ -165,6 +165,7 @@ void MixerToolBar::UpdatePrefs() // Show or hide the input slider based on whether it works mInputSlider->Enable(gAudioIO->InputMixerWorks()); + wxSize oldSize( GetSize() ); // Layout the toolbar Layout(); @@ -173,11 +174,18 @@ void MixerToolBar::UpdatePrefs() //Fit(); // And make that size the minimum - SetMinSize( wxWindow::GetSizer()->GetMinSize() ); - SetSize( GetMinSize() ); + wxSize newMinSize( wxWindow::GetSizer()->GetMinSize() ); + SetMinSize( newMinSize ); - // Notify someone that we've changed our size - Updated(); + // IF size must increase, do so. + if( newMinSize.y > oldSize.y ){ + SetSize( newMinSize ); + // Notify someone that we've changed our size + Updated(); + } + // ELSE preserve original size. + else + SetSize( oldSize ); #endif // Set label to pull in language change