mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-16 08:37:42 +02:00
Bug 1532 - Toolbars fail to arrange correctly when maximizing or restoring main window size
Layout() needs to be done before and after toolbar packing. See reasons in comments in revised code.
This commit is contained in:
parent
69b77a8034
commit
ab9bb2ae29
@ -2041,10 +2041,14 @@ void AudacityProject::UpdateLayout()
|
||||
if (!mTrackPanel)
|
||||
return;
|
||||
|
||||
// Layout first to get our NEW width,
|
||||
// Then and only then we can arrange the toolbars.
|
||||
// 1. Layout panel, to get widths of the docks.
|
||||
Layout();
|
||||
// 2. Layout toolbars to pack the toolbars correctly in docks which
|
||||
// are now the correct width.
|
||||
mToolManager->LayoutToolBars();
|
||||
// 3. Layout panel, to resize docks, in particular reducing the height
|
||||
// of any empty docks, or increasing the height of docks that need it.
|
||||
Layout();
|
||||
|
||||
// Retrieve size of this projects window
|
||||
wxSize mainsz = GetSize();
|
||||
|
Loading…
x
Reference in New Issue
Block a user