Clear selection before deleting DRC markers
Pcbnew crashes when a selected DRC marker is deleted. This a possible fix to lp:#1773863.
This commit is contained in:
parent
f51f30fb1e
commit
7c49bcd3a6
|
@ -39,6 +39,9 @@
|
|||
#include <class_draw_panel_gal.h>
|
||||
#include <view/view.h>
|
||||
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tools/pcb_actions.h>
|
||||
|
||||
/* 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 );
|
||||
|
|
Loading…
Reference in New Issue