Clear selection before 'Global Deletion' action

Fixes: lp:1690783
* https://bugs.launchpad.net/kicad/+bug/1690783
This commit is contained in:
Maciej Suminski 2017-05-16 09:16:03 +02:00
parent 14bb238b30
commit 4336db3a7c
1 changed files with 6 additions and 0 deletions

View File

@ -37,6 +37,9 @@ using namespace std::placeholders;
#include <class_track.h>
#include <class_zone.h>
#include <tool/tool_manager.h>
#include <tools/pcb_actions.h>
#include <dialog_global_deletion.h>
@ -94,6 +97,9 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete()
{
bool gen_rastnest = false;
// Clear selection before removing any items
m_Parent->GetToolManager()->RunAction( PCB_ACTIONS::selectionClear, true );
m_Parent->SetCurItem( NULL );
bool delAll = false;