see #2225 the GUI should open first non-standard library when user cereates new file

This commit is contained in:
Vadim Kurland
2011-04-01 18:57:24 -07:00
parent 8284337b2b
commit f6f28b983c
3 changed files with 7 additions and 0 deletions
+1
View File
@@ -321,6 +321,7 @@ public:
void saveLastOpenedLib();
void loadLastOpenedLib();
void loadFirstNonStandardLib();
bool checkin(bool unlock);
libfwbuilder::FWObject* loadLibrary(const std::string &libfpath);
+2
View File
@@ -204,6 +204,8 @@ bool ProjectPanel::fileNew()
save();
setupAutoSave();
loadFirstNonStandardLib();
QCoreApplication::postEvent(mw, new updateSubWindowTitlesEvent());
}
+4
View File
@@ -309,7 +309,11 @@ void ProjectPanel::loadLastOpenedLib()
return;
}
}
loadFirstNonStandardLib();
}
void ProjectPanel::loadFirstNonStandardLib()
{
list<FWObject*> all_libs = db()->getByType(Library::TYPENAME);
FWObject *first_non_system_lib = NULL;
for (list<FWObject*>::iterator i=all_libs.begin(); i!=all_libs.end(); ++i)