From 094d6de8e0e83322fb5b7d8735858f650741cb93 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 2 Oct 2013 11:21:17 +0200 Subject: [PATCH] Fixed reset for the selection tool. --- pcbnew/tools/selection_tool.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 39abf86c22..757a846712 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -67,6 +67,13 @@ SELECTION_TOOL::~SELECTION_TOOL() void SELECTION_TOOL::Reset() { + m_selection.group->Clear(); + m_selection.items.clear(); + + // Reinsert the VIEW_GROUP, in case it was removed from the VIEW + getView()->Remove( m_selection.group ); + getView()->Add( m_selection.group ); + // The tool launches upon reception of action event ("pcbnew.InteractiveSelection") Go( &SELECTION_TOOL::Main, COMMON_ACTIONS::selectionActivate.MakeEvent() ); }