From 7dc08c871808ec48a28c635453089ac6f844055d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 7 Apr 2014 13:50:18 +0200 Subject: [PATCH] Fixed switching back to selection tool using the right toolbar buttons in pcbnew (GAL). --- pcbnew/edit.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 0fbe391318..3aad9dc78f 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -1374,7 +1374,7 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) { std::string actionName = COMMON_ACTIONS::TranslateLegacyId( id ); - if( !actionName.empty() ) + if( !actionName.empty() || id == ID_NO_TOOL_SELECTED ) { const int MAX_TRIALS = 10; int trials = 0; @@ -1389,7 +1389,8 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) m_toolManager.ProcessEvent( cancel ); } - m_toolManager.RunAction( actionName ); + if( !actionName.empty() ) + m_toolManager.RunAction( actionName ); } } else