From 59b776298177d82671e68f2369813b6a70528918 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 15 Oct 2018 20:31:26 +0100 Subject: [PATCH] Back out workaround f1e2f142a67ee6756aaa5c31c66b239e66098b21. A proper fix is in bf164f7c4b03ffa12530871522f81f1e0aa3203e. --- include/pcb_base_frame.h | 3 --- pcbnew/pcb_base_frame.cpp | 28 +++++++++------------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/include/pcb_base_frame.h b/include/pcb_base_frame.h index c6ee8cbdb0..c18a773882 100644 --- a/include/pcb_base_frame.h +++ b/include/pcb_base_frame.h @@ -78,7 +78,6 @@ protected: GENERAL_COLLECTOR* m_Collector; PCB_GENERAL_SETTINGS m_configSettings; - bool m_toolbarsDirty; void updateGridSelectBox(); void updateZoomSelectBox(); @@ -585,8 +584,6 @@ public: virtual void OnSwitchCanvas( wxCommandEvent& aEvent ); - void OnUpdateToolbars( wxUpdateUIEvent& aEvent ); - // User interface update event handlers. void OnUpdateCoordType( wxUpdateUIEvent& aEvent ); void OnUpdatePadDrawMode( wxUpdateUIEvent& aEvent ); diff --git a/pcbnew/pcb_base_frame.cpp b/pcbnew/pcb_base_frame.cpp index a6c2202997..c1d8f373b5 100644 --- a/pcbnew/pcb_base_frame.cpp +++ b/pcbnew/pcb_base_frame.cpp @@ -88,7 +88,6 @@ BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME ) EVT_TOOL( ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH, PCB_BASE_FRAME::OnToggleEdgeDrawMode ) EVT_TOOL( ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH, PCB_BASE_FRAME::OnToggleTextDrawMode ) - EVT_UPDATE_UI( ID_H_TOOLBAR, PCB_BASE_FRAME::OnUpdateToolbars ) EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_POLAR_COORD, PCB_BASE_FRAME::OnUpdateCoordType ) EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_PADS_SKETCH, PCB_BASE_FRAME::OnUpdatePadDrawMode ) EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_GRAPHIC_SKETCH, PCB_BASE_FRAME::OnUpdateGraphicDrawMode ) @@ -110,8 +109,7 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame long aStyle, const wxString & aFrameName ) : EDA_DRAW_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ), m_Pcb( nullptr ), - m_configSettings( aFrameType ), - m_toolbarsDirty( false ) + m_configSettings( aFrameType ) { m_UserGridSize = wxPoint( (int) 10 * IU_PER_MILS, (int) 10 * IU_PER_MILS ); m_Collector = new GENERAL_COLLECTOR(); @@ -478,7 +476,10 @@ void PCB_BASE_FRAME::ShowChangedLanguage() EDA_DRAW_FRAME::ShowChangedLanguage(); // tooltips in toolbars - m_toolbarsDirty = true; + ReCreateHToolbar(); + ReCreateAuxiliaryToolbar(); + ReCreateVToolbar(); + ReCreateOptToolbar(); // status bar UpdateMsgPanel(); @@ -1062,7 +1063,10 @@ void PCB_BASE_FRAME::CommonSettingsChanged() { EDA_DRAW_FRAME::CommonSettingsChanged(); - m_toolbarsDirty = true; + ReCreateHToolbar(); + ReCreateAuxiliaryToolbar(); + ReCreateVToolbar(); + ReCreateOptToolbar(); EDA_3D_VIEWER* viewer = Get3DViewerFrame(); @@ -1075,20 +1079,6 @@ void PCB_BASE_FRAME::CommonSettingsChanged() } -void PCB_BASE_FRAME::OnUpdateToolbars( wxUpdateUIEvent& aEvent ) -{ - if( m_toolbarsDirty ) - { - ReCreateHToolbar(); - ReCreateAuxiliaryToolbar(); - ReCreateVToolbar(); - ReCreateOptToolbar(); - - m_toolbarsDirty = false; - } -} - - void PCB_BASE_FRAME::OnModify() { GetScreen()->SetModify();