Non-KiCad Schematic Importers: New project when running standalone

Create a new project when running eeschema standalone and importing
a non-KiCad Project.

If we have the project manager open, then we instead use the existing
project and load everything there.
This commit is contained in:
Roberto Fernandez Bautista 2021-03-16 19:59:09 +00:00 committed by Jeff Young
parent a0889705e7
commit 6c29f54988
1 changed files with 2 additions and 2 deletions

View File

@ -663,8 +663,8 @@ void SCH_EDIT_FRAME::OnImportProject( wxCommandEvent& aEvent )
if( !AskToSaveChanges() )
return;
// Set the project location if none is set
bool setProject = Prj().GetProjectFullName().IsEmpty();
// Set the project location if none is set or if we are running in standalone mode
bool setProject = Prj().GetProjectFullName().IsEmpty() || Kiface().IsSingle();
wxString path = wxPathOnly( Prj().GetProjectFullName() );
std::list<std::pair<const wxString, const SCH_IO_MGR::SCH_FILE_T>> loaders;