Free item memory when closing schematic window
This fires the dtor for each item on the screen, allowing us to properly close and remove them from the connection graph Fixes https://gitlab.com/kicad/code/kicad/-/issues/17961
This commit is contained in:
parent
f61ee3ff4b
commit
9fbda137cb
|
@ -1097,7 +1097,7 @@ void SCH_EDIT_FRAME::doCloseWindow()
|
||||||
if( !Schematic().GetFileName().IsEmpty() && !Schematic().RootScreen()->IsEmpty() )
|
if( !Schematic().GetFileName().IsEmpty() && !Schematic().RootScreen()->IsEmpty() )
|
||||||
UpdateFileHistory( fileName );
|
UpdateFileHistory( fileName );
|
||||||
|
|
||||||
Schematic().RootScreen()->Clear();
|
Schematic().RootScreen()->Clear( true );
|
||||||
|
|
||||||
// all sub sheets are deleted, only the main sheet is usable
|
// all sub sheets are deleted, only the main sheet is usable
|
||||||
GetCurrentSheet().clear();
|
GetCurrentSheet().clear();
|
||||||
|
|
Loading…
Reference in New Issue