mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-03 14:13:11 +02:00
Default all toolbars to docked on reset and new config
Combined meter and spectral toolbars default to hidden.
This commit is contained in:
parent
9404a28954
commit
6a0492e15d
@ -475,6 +475,7 @@ void ToolManager::Reset()
|
|||||||
wxWindow *floater;
|
wxWindow *floater;
|
||||||
ToolDock *dock;
|
ToolDock *dock;
|
||||||
ToolBar *bar = mBars[ ndx ];
|
ToolBar *bar = mBars[ ndx ];
|
||||||
|
bool expose = true;
|
||||||
|
|
||||||
// Disconnect the bar
|
// Disconnect the bar
|
||||||
if( bar->IsDocked() )
|
if( bar->IsDocked() )
|
||||||
@ -487,21 +488,17 @@ void ToolManager::Reset()
|
|||||||
floater = bar->GetParent();
|
floater = bar->GetParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ndx == SelectionBarID )
|
if (ndx == SelectionBarID
|
||||||
|
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||||
|
|| ndx == SpectralSelectionBarID
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
dock = mBotDock;
|
dock = mBotDock;
|
||||||
|
|
||||||
wxCommandEvent e;
|
wxCommandEvent e;
|
||||||
bar->GetEventHandler()->ProcessEvent(e);
|
bar->GetEventHandler()->ProcessEvent(e);
|
||||||
}
|
}
|
||||||
else if( ndx == MeterBarID
|
|
||||||
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
|
||||||
|| ndx == SpectralSelectionBarID
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
|
||||||
dock = NULL;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dock = mTopDock;
|
dock = mTopDock;
|
||||||
@ -516,11 +513,20 @@ void ToolManager::Reset()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if( ndx == MeterBarID
|
||||||
|
#ifdef EXPERIMENTAL_SPECTRAL_EDITING
|
||||||
|
|| ndx == SpectralSelectionBarID
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
{
|
||||||
|
expose = false;
|
||||||
|
}
|
||||||
|
|
||||||
if( dock != NULL )
|
if( dock != NULL )
|
||||||
{
|
{
|
||||||
// when we dock, we reparent, so bar is no longer a child of floater.
|
// when we dock, we reparent, so bar is no longer a child of floater.
|
||||||
dock->Dock( bar );
|
dock->Dock( bar );
|
||||||
Expose( ndx, true );
|
Expose( ndx, expose );
|
||||||
//OK (and good) to delete floater, as bar is no longer in it.
|
//OK (and good) to delete floater, as bar is no longer in it.
|
||||||
if( floater )
|
if( floater )
|
||||||
floater->Destroy();
|
floater->Destroy();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user