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:12 +02:00
parent 14bb238b30
commit 4336db3a7c
@@ -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;