When failing to import, ensure extant screen
We need at least the root screen in order to handle any action in Eeschema. Because this is destroyed by starting to load the new schematic, when failing, we need to reset to null. This is not as good as resetting to the previous state but that will take refactoring our file load routines in schematic editor Fixes https://gitlab.com/kicad/code/kicad/-/issues/16993
This commit is contained in:
parent
8d19d27483
commit
0d03f2febc
|
@ -777,6 +777,8 @@ void SCH_EDIT_FRAME::OnImportProject( wxCommandEvent& aEvent )
|
|||
if( pluginType == SCH_IO_MGR::SCH_FILE_T::SCH_FILE_UNKNOWN )
|
||||
{
|
||||
wxLogError( _( "No loader can read the specified file: '%s'." ), fn.GetFullPath() );
|
||||
CreateScreens();
|
||||
SetScreen( Schematic().RootScreen() );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue