From 07dc12fdd31f9574b97bd458db8af069fb4e3e36 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 14 Apr 2018 17:44:17 +0200 Subject: [PATCH] Fix incorrect UI management of Zoom to Selection, created by fix 2a419156 --- eeschema/lib_edit_frame.cpp | 2 +- eeschema/schedit.cpp | 2 +- gerbview/events_called_functions.cpp | 3 +-- pagelayout_editor/events_functions.cpp | 3 +-- pcbnew/footprint_edit_frame.cpp | 2 +- pcbnew/toolbars_update_user_interface.cpp | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/eeschema/lib_edit_frame.cpp b/eeschema/lib_edit_frame.cpp index e87e1a1845..9f59cff00f 100644 --- a/eeschema/lib_edit_frame.cpp +++ b/eeschema/lib_edit_frame.cpp @@ -472,7 +472,7 @@ void LIB_EDIT_FRAME::ClearSearchTreeSelection() void LIB_EDIT_FRAME::OnUpdateSelectTool( wxUpdateUIEvent& aEvent ) { - if( aEvent.GetEventObject() == m_drawToolBar ) + if( aEvent.GetEventObject() == m_drawToolBar || aEvent.GetEventObject() == m_mainToolBar ) aEvent.Check( GetToolId() == aEvent.GetId() ); } diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 2d44c62476..f50278e62f 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -640,7 +640,7 @@ void SCH_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) void SCH_EDIT_FRAME::OnUpdateSelectTool( wxUpdateUIEvent& aEvent ) { - if( aEvent.GetEventObject() == m_drawToolBar ) + if( aEvent.GetEventObject() == m_drawToolBar || aEvent.GetEventObject() == m_mainToolBar ) aEvent.Check( GetToolId() == aEvent.GetId() ); } diff --git a/gerbview/events_called_functions.cpp b/gerbview/events_called_functions.cpp index b48f93f58a..668c5c3d24 100644 --- a/gerbview/events_called_functions.cpp +++ b/gerbview/events_called_functions.cpp @@ -532,8 +532,7 @@ void GERBVIEW_FRAME::OnToggleFlashItemDrawMode( wxCommandEvent& aEvent ) void GERBVIEW_FRAME::OnUpdateSelectTool( wxUpdateUIEvent& aEvent ) { - if( aEvent.GetEventObject() == m_drawToolBar ) - aEvent.Check( GetToolId() == aEvent.GetId() ); + aEvent.Check( GetToolId() == aEvent.GetId() ); } diff --git a/pagelayout_editor/events_functions.cpp b/pagelayout_editor/events_functions.cpp index 85ec0a0771..61237977c8 100644 --- a/pagelayout_editor/events_functions.cpp +++ b/pagelayout_editor/events_functions.cpp @@ -619,6 +619,5 @@ void PL_EDITOR_FRAME::OnUpdateTitleBlockDisplaySpecialMode( wxUpdateUIEvent& eve void PL_EDITOR_FRAME::OnUpdateSelectTool( wxUpdateUIEvent& aEvent ) { - if( aEvent.GetEventObject() == m_drawToolBar ) - aEvent.Check( GetToolId() == aEvent.GetId() ); + aEvent.Check( GetToolId() == aEvent.GetId() ); } diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index cfd0f9df6f..b6a9546920 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -572,7 +572,7 @@ void FOOTPRINT_EDIT_FRAME::CloseModuleEditor( wxCommandEvent& Event ) void FOOTPRINT_EDIT_FRAME::OnUpdateSelectTool( wxUpdateUIEvent& aEvent ) { - if( aEvent.GetEventObject() == m_drawToolBar ) + if( aEvent.GetEventObject() == m_drawToolBar || aEvent.GetEventObject() == m_mainToolBar ) aEvent.Check( GetToolId() == aEvent.GetId() ); } diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp index c765dbe4b4..8b59ac70c0 100644 --- a/pcbnew/toolbars_update_user_interface.cpp +++ b/pcbnew/toolbars_update_user_interface.cpp @@ -195,7 +195,7 @@ void PCB_EDIT_FRAME::OnUpdateSave( wxUpdateUIEvent& aEvent ) void PCB_EDIT_FRAME::OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent ) { - if( aEvent.GetEventObject() == m_drawToolBar ) + if( aEvent.GetEventObject() == m_drawToolBar || aEvent.GetEventObject() == m_mainToolBar ) aEvent.Check( GetToolId() == aEvent.GetId() ); }