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