mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-13 16:39:48 +02:00
see #2225 the GUI should open first non-standard library when user cereates new file
This commit is contained in:
@@ -321,6 +321,7 @@ public:
|
||||
|
||||
void saveLastOpenedLib();
|
||||
void loadLastOpenedLib();
|
||||
void loadFirstNonStandardLib();
|
||||
|
||||
bool checkin(bool unlock);
|
||||
libfwbuilder::FWObject* loadLibrary(const std::string &libfpath);
|
||||
|
||||
@@ -204,6 +204,8 @@ bool ProjectPanel::fileNew()
|
||||
save();
|
||||
setupAutoSave();
|
||||
|
||||
loadFirstNonStandardLib();
|
||||
|
||||
QCoreApplication::postEvent(mw, new updateSubWindowTitlesEvent());
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user