mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Slightly improved behaviour when the common collection directory is not available.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1277 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -797,17 +797,19 @@ void ElementsPanel::reload(bool reload_collections) {
|
||||
emit(loadingProgressed(loading_progress_ = 0, items_count));
|
||||
|
||||
// chargement des elements de la collection QET
|
||||
if (QETApp::commonElementsCollection()->rootCategory()) {
|
||||
common_collection_item_ = addCollection(invisibleRootItem(), QETApp::commonElementsCollection(), tr("Collection QET"), QIcon(":/ico/16x16/qet.png"));
|
||||
if (first_reload_) common_collection_item_ -> setExpanded(true);
|
||||
}
|
||||
|
||||
// chargement des elements de la collection utilisateur
|
||||
if (QETApp::customElementsCollection()->rootCategory()) {
|
||||
custom_collection_item_ = addCollection(invisibleRootItem(), QETApp::customElementsCollection(), tr("Collection utilisateur"), QIcon(":/ico/16x16/go-home.png"));
|
||||
if (first_reload_) custom_collection_item_ -> setExpanded(true);
|
||||
}
|
||||
|
||||
// the first time, expand the first level of collections
|
||||
if (first_reload_) {
|
||||
first_reload_ = true;
|
||||
common_collection_item_ -> setExpanded(true);
|
||||
custom_collection_item_ -> setExpanded(true);
|
||||
}
|
||||
if (first_reload_) first_reload_ = false;
|
||||
|
||||
// chargement des projets
|
||||
foreach(QETProject *project, projects_to_display_.values()) {
|
||||
|
||||
Reference in New Issue
Block a user