From f0b94dd0d4d0c88a786ca43eb880691109f1c06a Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Sat, 8 Aug 2020 16:28:56 +0100 Subject: [PATCH] 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 --- kicad/kicad.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kicad/kicad.cpp b/kicad/kicad.cpp index 18c3b20d21..43996a9049 100644 --- a/kicad/kicad.cpp +++ b/kicad/kicad.cpp @@ -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 );