Stop treating OpenProjectFiles failure like a fatal error

There is no need to try to bail out if this call fails,
and the bail-out was wiping out the app settings.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13427
This commit is contained in:
Jon Evans 2023-01-22 22:48:21 -05:00
parent 1bc3f77d2e
commit e76fd128c3
1 changed files with 1 additions and 16 deletions

View File

@ -408,22 +408,7 @@ bool PGM_SINGLE_TOP::OnPgmInit()
fileArgs[0] = argv1.GetFullPath();
}
// Use the KIWAY_PLAYER::OpenProjectFiles() API function:
if( !frame->OpenProjectFiles( fileArgs ) )
{
// OpenProjectFiles() API asks that it report failure to the UI.
// Nothing further to say here.
// We've already initialized things at this point, but wx won't call OnExit if
// we fail out. Call our own cleanup routine here to ensure the relevant resources
// are freed at the right time (if they aren't, segfaults will occur).
OnPgmExit();
// Fail the process startup if the file could not be opened,
// although this is an optional choice, one that can be reversed
// also in the KIFACE specific OpenProjectFiles() return value.
return false;
}
frame->OpenProjectFiles( fileArgs );
}
return true;