diff --git a/pcbnew/dialogs/dialog_global_deletion.cpp b/pcbnew/dialogs/dialog_global_deletion.cpp index 85e88363c9..0074b71675 100644 --- a/pcbnew/dialogs/dialog_global_deletion.cpp +++ b/pcbnew/dialogs/dialog_global_deletion.cpp @@ -37,6 +37,9 @@ using namespace std::placeholders; #include #include +#include +#include + #include @@ -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;