Pcbnew: fix crash when deleting pads in the board editor
Fixes # |3684 https://gitlab.com/kicad/code/kicad/issues/3684
This commit is contained in:
parent
fa200f3d39
commit
cc185e4b8a
|
@ -898,6 +898,17 @@ int EDIT_TOOL::Remove( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PCB_PAD_T:
|
||||||
|
{
|
||||||
|
auto pad = static_cast<D_PAD*>( item );
|
||||||
|
auto parent = static_cast<MODULE*>( item->GetParent() );
|
||||||
|
|
||||||
|
m_commit->Modify( parent );
|
||||||
|
getView()->Remove( pad );
|
||||||
|
parent->Remove( pad );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
m_commit->Remove( item );
|
m_commit->Remove( item );
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue