Fixed reset for the selection tool.

This commit is contained in:
Maciej Suminski 2013-10-02 11:21:17 +02:00
parent 2ee858072f
commit 0b7305a823
1 changed files with 7 additions and 0 deletions

View File

@ -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() );
}