Eeschema: does not close when the schematic file given in command line to run Eeschema is not found (i.e. when starting a new project). Otherwise one cannot start a new schematic project.

This commit is contained in:
jean-pierre charras 2014-03-23 07:44:15 +01:00
parent 2db6c2c929
commit f1ee6de025
1 changed files with 6 additions and 2 deletions

View File

@ -376,7 +376,9 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
msg.Printf( _( "File '%s' not found." ), msg.Printf( _( "File '%s' not found." ),
GetChars( g_RootSheet->GetScreen()->GetFileName() ) ); GetChars( g_RootSheet->GetScreen()->GetFileName() ) );
DisplayInfoMessage( this, msg ); DisplayInfoMessage( this, msg );
return false; // return false;
return true; // do not close Eeschema if the file if not found:
// we may have to create a new schematic file.
} }
// load the project. // load the project.
@ -392,7 +394,9 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
SetSheetNumberAndCount(); SetSheetNumberAndCount();
m_canvas->Refresh( true ); m_canvas->Refresh( true );
return diag; // return diag;
return true; // do not close Eeschema if the file if not found:
// we may have to create a new schematic file.
} }