mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-16 07:47:58 +01:00
Revert "Fix for #1554: toolbars open undocked if previously hidden"
This reverts commit 048c1b8c5a.
I observed that it was not all right if you switch between Audacity versions, as
some cautious upgraders might do:
Delete audacity.cfg.
Open 2.2.0 and quit.
Open 2.1.3 -- and observe that the scrubbing and combined meter toolbars appear,
one over the other, at top left. Combined and separate meter toolbars are not
meant to appear at the same time.
Quit 2.1.3 and open 2.2.0. Now those two toolbars appear at some other random
seeming positions.
This commit is contained in:
@@ -237,11 +237,7 @@ bool ToolBarConfiguration::Read
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
// Future: might remember visibility in the configuration, not forgetting
|
||||
// positions of hidden bars.
|
||||
gPrefs->Read( wxT("Show"), &visible, defaultVisible);
|
||||
|
||||
if (pConfiguration && visible) {
|
||||
if (pConfiguration) {
|
||||
int ord;
|
||||
gPrefs->Read( wxT("Order"), &ord, -1 );
|
||||
// Index was written 1-based
|
||||
@@ -271,6 +267,10 @@ bool ToolBarConfiguration::Read
|
||||
}
|
||||
}
|
||||
|
||||
// Future: might remember visibility in the configuration, not forgetting
|
||||
// positions of hidden bars.
|
||||
gPrefs->Read( wxT("Show"), &visible, defaultVisible);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -376,8 +376,8 @@ void ToolDock::Undock( ToolBar *bar )
|
||||
if( mConfiguration.Contains( bar ) )
|
||||
{
|
||||
mConfiguration.Remove( bar );
|
||||
mBars[ bar->GetId() ] = nullptr;
|
||||
}
|
||||
mBars[ bar->GetId() ] = nullptr;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -403,15 +403,14 @@ void ToolDock::Dock( ToolBar *bar, bool deflate, ToolBarConfiguration::Position
|
||||
);
|
||||
|
||||
// Park the NEW bar in the correct berth
|
||||
if (!mConfiguration.Contains(bar) && bar->IsVisible())
|
||||
if (!mConfiguration.Contains(bar))
|
||||
mConfiguration.Insert( bar, position );
|
||||
|
||||
// Inform toolbar of change
|
||||
bar->SetDocked( this, false );
|
||||
|
||||
// Rearrange our world
|
||||
if (bar->IsVisible())
|
||||
LayoutToolBars();
|
||||
LayoutToolBars();
|
||||
Updated();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user