1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-24 16:20:05 +02:00

Remove redundant calls to update toolbars

This commit is contained in:
Paul Licameli 2018-01-21 22:22:45 -05:00
parent 01634938cc
commit a90c6c45f3
2 changed files with 4 additions and 10 deletions

View File

@ -440,11 +440,6 @@ void ToolDock::Dock( ToolBar *bar, bool deflate, ToolBarConfiguration::Position
// Inform toolbar of change // Inform toolbar of change
bar->SetDocked( this, false ); bar->SetDocked( this, false );
// Rearrange our world
if (bar->IsVisible())
LayoutToolBars();
Updated();
} }
// Initial docking of bars // Initial docking of bars
@ -458,6 +453,7 @@ void ToolDock::LoadConfig()
// configuration // configuration
Expose( bar->GetId(), true ); Expose( bar->GetId(), true );
} }
Updated();
} }
// A policy object for the skeleton routine below // A policy object for the skeleton routine below
@ -847,10 +843,6 @@ void ToolDock::Expose( int type, bool show )
// Make it (dis)appear // Make it (dis)appear
t->Expose( show ); t->Expose( show );
// Update the layout
LayoutToolBars();
Updated();
} }
// //

View File

@ -610,7 +610,6 @@ void ToolManager::Reset()
// It would be nice to show them again, but hardly essential as // It would be nice to show them again, but hardly essential as
// they will show up again on the next play. // they will show up again on the next play.
// SetVUMeters(AudacityProject *p); // SetVUMeters(AudacityProject *p);
LayoutToolBars();
Updated(); Updated();
} }
@ -1061,6 +1060,7 @@ bool ToolManager::IsVisible( int type )
void ToolManager::ShowHide( int type ) void ToolManager::ShowHide( int type )
{ {
Expose( type, !mBars[ type ]->IsVisible() ); Expose( type, !mBars[ type ]->IsVisible() );
Updated();
} }
// //
@ -1146,6 +1146,7 @@ void ToolManager::OnMouse( wxMouseEvent & event )
{ {
// Trip over...everyone ashore that's going ashore... // Trip over...everyone ashore that's going ashore...
mDragDock->Dock( mDragBar, true, mDragBefore ); mDragDock->Dock( mDragBar, true, mDragBefore );
Updated();
mDragWindow->ClearBar(); mDragWindow->ClearBar();
// Done with the floater // Done with the floater
@ -1461,6 +1462,7 @@ void ToolManager::HandleEscapeKey()
// I want to go home. // I want to go home.
mPrevDock->RestoreConfiguration(mPrevConfiguration); mPrevDock->RestoreConfiguration(mPrevConfiguration);
mPrevDock->Dock( mDragBar, true, mPrevSlot ); mPrevDock->Dock( mDragBar, true, mPrevSlot );
Updated();
// Done with the floater // Done with the floater
mDragWindow->ClearBar(); mDragWindow->ClearBar();