modedit: clear the pcb when closing the window
Before closing the window in the footprint editor, we clear the existing pcb, undo/redo stack and associated memory to prevent callbacks double-freeing on destruction. Fixes: lp:1784504 * https://bugs.launchpad.net/kicad/+bug/1784504
This commit is contained in:
parent
f6d9c3a733
commit
b7a321d143
|
@ -547,7 +547,12 @@ void FOOTPRINT_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
|
|||
}
|
||||
|
||||
if( IsGalCanvasActive() )
|
||||
{
|
||||
GetGalCanvas()->SetEventDispatcher( NULL );
|
||||
GetGalCanvas()->StopDrawing();
|
||||
}
|
||||
|
||||
Clear_Pcb( false );
|
||||
|
||||
//close the editor
|
||||
Destroy();
|
||||
|
|
Loading…
Reference in New Issue