Bug 167867

Summary: Album view is reset by changing settings
Product: [Applications] digikam Reporter: Gandalf Lechner <gandalflechner>
Component: Setup-CollectionsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 0.10.0

Description Gandalf Lechner 2008-07-31 17:48:51 UTC
Version:           0.10.0-beta3 (rev.: 840177) (using 4.1.00 (KDE 4.1.0), Kubuntu packages)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.24-17-generic

In the album view, when you start Settings->Configure Digikam, the Album view is reset after confirming the config dialog, i.e. you are thrown back to the root path "My Albums". Since "include Album Sub-Tree" does not work on root albums (intentionally?), this can puzzle the user who is faced by a blank window instead of the thumbnails he was looking at before.
Comment 1 caulier.gilles 2008-07-31 19:26:37 UTC
Marcel, I confirm this bug. 

Gilles
Comment 2 Marcel Wiesweg 2008-08-01 15:57:12 UTC
Oh yes I was once fixing that but forgot later on. I will see that there is no full Albummanager reload anymore after setup (only if the database file actually changed)
Comment 3 caulier.gilles 2008-08-24 09:16:24 UTC
SVN commit 851604 by mwiesweg:

Dont cause an AlbumManager reset each time exiting setup, this is only

necessary for the rare case of a db path change.

BUG: 167867


 M  +6 -3      digikamapp.cpp


--- trunk/extragear/graphics/digikam/digikam/digikamapp.cpp #851603:851604
@@ -1903,11 +1903,14 @@
    //if(AlbumSettings::instance()->getAlbumLibraryPath() != AlbumManager::instance()->getLibraryPath())
      //  d->view->clearHistory();

-    if (AlbumManager::instance()->setDatabase(AlbumSettings::instance()->getDatabaseFilePath(), false))
-        AlbumManager::instance()->startScan();
+    if (!AlbumManager::instance()->databaseEqual(AlbumSettings::instance()->getDatabaseFilePath()))
+    {
+        if (AlbumManager::instance()->setDatabase(AlbumSettings::instance()->getDatabaseFilePath(), false))
+            AlbumManager::instance()->startScan();
+    }

    if(AlbumSettings::instance()->getShowFolderTreeViewItemsCount())
-        AlbumManager::instance()->refresh();
+        AlbumManager::instance()->prepareItemCounts();

    d->view->applySettings();
    d->albumIconViewFilter->readSettings();