Clear view before resetting schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15159
This commit is contained in:
parent
415dcf82c4
commit
cab0db76f8
|
@ -671,6 +671,9 @@ void SCH_EDIT_FRAME::OnImportProject( wxCommandEvent& aEvent )
|
|||
Schematic().SetProject( nullptr );
|
||||
GetSettingsManager()->UnloadProject( &Prj(), false );
|
||||
|
||||
// Clear view before destroying schematic as repaints depend on schematic being valid
|
||||
SetScreen( nullptr );
|
||||
|
||||
Schematic().Reset();
|
||||
|
||||
wxFileName projectFn( dlg.GetPath() );
|
||||
|
|
Loading…
Reference in New Issue