[qet] [1277] Slightly improved behaviour when the common collection directory is not available . |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 1277
Author: xavier
Date: 2011-05-10 13:39:28 +0200 (Tue, 10 May 2011)
Log Message:
-----------
Slightly improved behaviour when the common collection directory is not available.
Modified Paths:
--------------
branches/0.3/sources/elementspanel.cpp
Modified: branches/0.3/sources/elementspanel.cpp
===================================================================
--- branches/0.3/sources/elementspanel.cpp 2011-04-21 08:53:49 UTC (rev 1276)
+++ branches/0.3/sources/elementspanel.cpp 2011-05-10 11:39:28 UTC (rev 1277)
@@ -797,17 +797,19 @@
emit(loadingProgressed(loading_progress_ = 0, items_count));
// chargement des elements de la collection QET
- common_collection_item_ = addCollection(invisibleRootItem(), QETApp::commonElementsCollection(), tr("Collection QET"), QIcon(":/ico/16x16/qet.png"));
+ 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
- custom_collection_item_ = addCollection(invisibleRootItem(), QETApp::customElementsCollection(), tr("Collection utilisateur"), QIcon(":/ico/16x16/go-home.png"));
+ 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()) {