From a1a4275e8b619a9f43589eb7cce1a7fa92264050 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 15 Mar 2018 23:01:17 +0000 Subject: [PATCH] Cancel interactive tools when entering DRC. Fixes: lp:1541526 * https://bugs.launchpad.net/kicad/+bug/1541526 --- pcbnew/drc.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbnew/drc.cpp b/pcbnew/drc.cpp index f1bb551a9c..f66e39ce70 100644 --- a/pcbnew/drc.cpp +++ b/pcbnew/drc.cpp @@ -70,9 +70,13 @@ void DRC::ShowDRCDialog( wxWindow* aParent ) aParent = m_pcbEditorFrame; } + TOOL_MANAGER* toolMgr = m_pcbEditorFrame->GetToolManager(); + toolMgr->RunAction( ACTIONS::cancelInteractive, true ); + toolMgr->DeactivateTool(); + toolMgr->RunAction( PCB_ACTIONS::selectionClear, true ); + if( !m_drcDialog ) { - m_pcbEditorFrame->GetToolManager()->RunAction( PCB_ACTIONS::selectionClear, true ); m_drcDialog = new DIALOG_DRC_CONTROL( this, m_pcbEditorFrame, aParent ); updatePointers();