diff --git a/eeschema/class_library.cpp b/eeschema/class_library.cpp index 73e6f75135..55b17793a1 100644 --- a/eeschema/class_library.cpp +++ b/eeschema/class_library.cpp @@ -595,7 +595,7 @@ void PART_LIBS::LoadAllLibraries( PROJECT* aProject, bool aShowProgress ) wxASSERT( !size() ); // expect to load into "this" empty container. - wxProgressDialog lib_dialog( _( "Loading symbol libraries" ), + wxProgressDialog lib_dialog( _( "Loading Symbol Libraries" ), wxEmptyString, lib_names.GetCount(), NULL, diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index 0afbd5504a..a57f070072 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -275,23 +275,30 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in SetStatusText( wxEmptyString ); ClearMsgPanel(); + LoadProjectFile(); + // PROJECT::SetProjectFullName() is an impactful function. It should only be // called under carefully considered circumstances. // The calling code should know not to ask me here to change projects unless // it knows what consequences that will have on other KIFACEs running and using // this same PROJECT. It can be very harmful if that calling code is stupid. - Prj().SetProjectFullName( pro.GetFullPath() ); - LoadProjectFile(); + // Don't reload the symbol libraries if we are just launching Eeschema from KiCad again. + // They are already saved in the kiface project object. + if( pro.GetFullPath() != Prj().GetProjectFullName() + || !Prj().GetElem( PROJECT::ELEM_SCH_PART_LIBS ) ) + { + Prj().SetProjectFullName( pro.GetFullPath() ); - // load the libraries here, not in SCH_SCREEN::Draw() which is a context - // that will not tolerate DisplayError() dialog since we're already in an - // event handler in there. - // And when a schematic file is loaded, we need these libs to initialize - // some parameters (links to PART LIB, dangling ends ...) - Prj().SetElem( PROJECT::ELEM_SCH_PART_LIBS, NULL ); - Prj().SchLibs(); + // load the libraries here, not in SCH_SCREEN::Draw() which is a context + // that will not tolerate DisplayError() dialog since we're already in an + // event handler in there. + // And when a schematic file is loaded, we need these libs to initialize + // some parameters (links to PART LIB, dangling ends ...) + Prj().SetElem( PROJECT::ELEM_SCH_PART_LIBS, NULL ); + Prj().SchLibs(); + } if( is_new ) {