Clear view before resetting schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15159
(cherry picked from commit cab0db76f8)
This commit is contained in:
@@ -638,6 +638,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() );
|
||||
|
||||
Reference in New Issue
Block a user