diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index 370c149796..d77cdaa5f0 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -39,6 +39,9 @@ #include #include +#include +#include + /* class DIALOG_DRC_CONTROL: a dialog to set DRC parameters (clearance, min cooper size) * and run DRC tests */ @@ -649,6 +652,10 @@ void DIALOG_DRC_CONTROL::RedrawDrawPanel() void DIALOG_DRC_CONTROL::DelDRCMarkers() { m_brdEditor->SetCurItem( NULL ); // clear curr item, because it could be a DRC marker + + // Clear current selection list to avoid selection of deleted items + m_brdEditor->GetToolManager()->RunAction( PCB_ACTIONS::selectionClear, true ); + m_ClearanceListBox->DeleteAllItems(); m_UnconnectedListBox->DeleteAllItems(); m_DeleteCurrentMarkerButton->Enable( false );