Load the previous project if an empty string is the argument

Previously it would just not open any project at all. This
was a problem for some launchers, which would pass an empty string
when no file is passed by the user.

Fixes https://gitlab.com/kicad/code/kicad/issues/5055
This commit is contained in:
Ian McInerney 2020-08-08 16:28:56 +01:00
parent ba5ab99a03
commit f0b94dd0d4
1 changed files with 2 additions and 3 deletions

View File

@ -139,10 +139,9 @@ bool PGM_KICAD::OnPgmInit()
wxString projToLoad;
if( App().argc > 1 )
{
projToLoad = App().argv[1];
}
else if( GetFileHistory().GetCount() )
if( projToLoad.IsEmpty() && GetFileHistory().GetCount() )
{
wxString last_pro = GetFileHistory().GetHistoryFile( 0 );