Ripout the old SyncToolbars infrastructure reminants
The tool framework no longer needs to request updates of the UI state for the controls, wxWidgets will do it for us.
This commit is contained in:
parent
75cdf9df4e
commit
4491f24d5e
|
@ -917,9 +917,6 @@ void EDA_DRAW_FRAME::RecreateToolbars()
|
|||
|
||||
if( m_auxiliaryToolBar ) // Additional tools under main toolbar
|
||||
ReCreateAuxiliaryToolbar();
|
||||
|
||||
// Update the checked state of tools
|
||||
SyncToolbars();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1150,10 +1150,5 @@ void TOOL_MANAGER::UpdateUI( const TOOL_EVENT& aEvent )
|
|||
EDA_BASE_FRAME* frame = dynamic_cast<EDA_BASE_FRAME*>( GetToolHolder() );
|
||||
|
||||
if( frame )
|
||||
{
|
||||
frame->UpdateStatusBar();
|
||||
|
||||
if( !aEvent.IsMotion() && !aEvent.IsDrag() )
|
||||
frame->SyncToolbars();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -167,9 +167,6 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
// Start the main processing loop
|
||||
m_toolManager->InvokeTool( "cvpcb.Control" );
|
||||
|
||||
// Ensure the toolbars are sync'd properly so the filtering options display correct
|
||||
SyncToolbars();
|
||||
|
||||
SetShutdownBlockReason( _( "Symbol to footprint changes are unsaved" ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
|
|||
|
||||
ReCreateHToolbar();
|
||||
ReCreateVToolbar();
|
||||
ReCreateMenuBar(); // Create after toolbars so that SyncToolbars works
|
||||
ReCreateMenuBar();
|
||||
|
||||
m_libList = new wxListBox( this, ID_LIBVIEW_LIB_LIST, wxDefaultPosition, wxDefaultSize,
|
||||
0, NULL, wxLB_HSCROLL | wxNO_BORDER );
|
||||
|
|
|
@ -228,7 +228,6 @@ bool LIB_EDIT_FRAME::LoadOneLibraryPartAux( LIB_PART* aEntry, const wxString& aL
|
|||
updateTitle();
|
||||
RebuildSymbolUnitsList();
|
||||
SetShowDeMorgan( GetCurPart()->HasConversion() );
|
||||
SyncToolbars();
|
||||
|
||||
// Display the document information based on the entry selected just in
|
||||
// case the entry is an alias.
|
||||
|
|
|
@ -204,9 +204,6 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent )
|
|||
|
||||
GetToolManager()->RunAction( ACTIONS::zoomFitScreen, true );
|
||||
|
||||
// Update the checked state of tools
|
||||
SyncToolbars();
|
||||
|
||||
// Ensure the window is on top
|
||||
Raise();
|
||||
}
|
||||
|
@ -401,8 +398,6 @@ void GERBVIEW_FRAME::ReFillLayerWidget()
|
|||
m_LayersManager->ReFill();
|
||||
m_SelLayerBox->Resync();
|
||||
ReCreateAuxiliaryToolbar();
|
||||
// Update the checked state of tools
|
||||
SyncToolbars();
|
||||
|
||||
wxAuiPaneInfo& lyrs = m_auimgr.GetPane( m_LayersManager );
|
||||
wxSize bestz = m_LayersManager->GetBestSize();
|
||||
|
@ -1131,9 +1126,6 @@ void GERBVIEW_FRAME::ActivateGalCanvas()
|
|||
|
||||
ReCreateOptToolbar();
|
||||
ReCreateMenuBar();
|
||||
|
||||
// Update the checked state of tools
|
||||
SyncToolbars();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -528,12 +528,6 @@ public:
|
|||
*/
|
||||
virtual void UpdateStatusBar() { }
|
||||
|
||||
/**
|
||||
* Update the toolbars (mostly settings/check buttons/checkboxes) with the current
|
||||
* controller state.
|
||||
*/
|
||||
virtual void SyncToolbars() { };
|
||||
|
||||
/**
|
||||
* Redraw the menus and what not in current language.
|
||||
*/
|
||||
|
|
|
@ -421,8 +421,6 @@ void KICAD_MANAGER_FRAME::LoadProject( const wxFileName& aProjectFileName )
|
|||
|
||||
m_leftWin->ReCreateTreePrj();
|
||||
|
||||
SyncToolbars();
|
||||
|
||||
// Rebuild the list of watched paths.
|
||||
// however this is possible only when the main loop event handler is running,
|
||||
// so we use it to run the rebuild function.
|
||||
|
|
|
@ -450,7 +450,6 @@ void DIALOG_DRC::OnDRCItemRClick( wxDataViewEvent& aEvent )
|
|||
updateDisplayedCounts();
|
||||
refreshBoardEditor();
|
||||
m_brdEditor->OnModify();
|
||||
m_brdEditor->SyncToolbars();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -139,9 +139,6 @@ void PCB_BASE_EDIT_FRAME::SetGridVisibility( bool aVisible )
|
|||
// Update the grid checkbox in the layer widget
|
||||
if( m_appearancePanel )
|
||||
m_appearancePanel->SetObjectVisible( LAYER_GRID, aVisible );
|
||||
|
||||
// TODO (ISM): Remove this by changing toolbars to use the EVT_UPDATE_UI to get the state
|
||||
SyncToolbars();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -697,9 +697,6 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
|
|||
PCB_DISPLAY_OPTIONS opt = myframe->GetDisplayOptions();
|
||||
opt.m_ShowGlobalRatsnest = isEnabled;
|
||||
myframe->SetDisplayOptions( opt );
|
||||
|
||||
// TODO(ISM): Remove once EVT_UPDATE_UI works
|
||||
myframe->SyncToolbars();
|
||||
}
|
||||
}
|
||||
else if( aId != LAYER_GRID )
|
||||
|
|
|
@ -244,9 +244,6 @@ int PCBNEW_CONTROL::HighContrastModeCycle( const TOOL_EVENT& aEvent )
|
|||
|
||||
m_frame->SetDisplayOptions( opts );
|
||||
|
||||
// TODO(ISM): remove once EVT_UPDATE_UI works
|
||||
m_frame->SyncToolbars();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -127,9 +127,6 @@ APPEARANCE_CONTROLS::APPEARANCE_CONTROLS( PCB_BASE_FRAME* aParent, wxWindow* aFo
|
|||
m_frame->SetDisplayOptions( opts );
|
||||
m_frame->GetCanvas()->SetHighContrastLayer( m_frame->GetActiveLayer() );
|
||||
m_frame->GetCanvas()->Refresh();
|
||||
|
||||
// TODO: remove once EVT_UPDATE_UI works
|
||||
m_frame->SyncToolbars();
|
||||
};
|
||||
|
||||
m_rbHighContrastNormal->Bind( wxEVT_RADIOBUTTON,
|
||||
|
@ -937,9 +934,6 @@ void APPEARANCE_CONTROLS::onObjectVisibilityChanged( GAL_LAYER_ID aLayer, bool i
|
|||
PCB_DISPLAY_OPTIONS opt = m_frame->GetDisplayOptions();
|
||||
opt.m_ShowGlobalRatsnest = isVisible;
|
||||
m_frame->SetDisplayOptions( opt );
|
||||
|
||||
// TODO(ISM): Remove once EVT_UPDATE_UI works
|
||||
m_frame->SyncToolbars();
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue