1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-21 06:40:08 +02:00

Bug 2120 - Spectral Selection Toolbar can be truncated when undocked

This commit is contained in:
James Crook 2019-07-28 13:08:34 +01:00
parent ee46155d82
commit 29b0e31ee6

View File

@ -369,7 +369,15 @@ void SpectralSelectionBar::OnChoice(wxCommandEvent &)
GetSizer()->Layout(); // Required so that the layout does not mess up on Windows when changing the format.
wxWindowBase::GetSizer()->SetMinSize(wxSize(0, mHeight)); // so that height of toolbar does not change
wxWindowBase::GetSizer()->SetSizeHints(this);
Updated();
if( IsDocked() )
Updated();
else {
// Bug 2120. Changing the choice also changes the size of the toolbar so
// we need to update the client size, even if undocked.
// If attempting to make this code nicer, remember to test both changing the choice,
// and the choice remaining the same.
GetParent()->SetClientSize( GetSize() + wxSize( 2,2));
}
}
void SpectralSelectionBar::OnIdle( wxIdleEvent &evt )