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:
parent
90a17427ee
commit
226e5205c4
|
@ -138,10 +138,10 @@ bool PGM_KICAD::OnPgmInit()
|
|||
wxString projToLoad;
|
||||
|
||||
if( App().argc > 1 )
|
||||
{
|
||||
projToLoad = App().argv[1];
|
||||
}
|
||||
else if( settings->m_OpenProjects.size() ) // Check that there was a file open.
|
||||
|
||||
// If no file was given as an argument, check that there was a file open.
|
||||
if( projToLoad.IsEmpty() && settings->m_OpenProjects.size() )
|
||||
{
|
||||
wxString last_pro = settings->m_OpenProjects.front();
|
||||
settings->m_OpenProjects.erase( settings->m_OpenProjects.begin() );
|
||||
|
|
Loading…
Reference in New Issue