Bug 274775

Summary: "Find similar search" results are displayed when digiKam starts, although another album is selected
Product: [Applications] digikam Reporter: Andi Clemens <andi.clemens>
Component: Searches-SimilarityAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: 2.5.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 2.6.0
Sentry Crash Report:
Attachments: Here is my rc diff

Description Andi Clemens 2011-06-02 19:05:44 UTC
Version:           2.0.0 (using KDE 4.6.3) 
OS:                Linux

Whenever I create a "Find similar" search, this album is displayed, although another album was selected.

Reproducible: Didn't try

Steps to Reproduce:
1. Start find similar search
2. make sure you see the results in the album view
3. change into the album folder view, select some album
4. close digiKam
5. start digikam again
6. the album is selected in the album tree view, but the "find similar" search is displayed.

This does not happen when you selected the "sketch" search view or duplicate search view.




OS: Linux (i686) release 2.6.38-ARCH
Compiler: gcc
Comment 1 Marcel Wiesweg 2011-06-11 23:05:15 UTC
I couldnt reproduce at first try.
Can you check the diff of digikamrc before and after? Two settings are relevant:

ActiveTab

determines the left side bar tab,

InitialAlbumID

the initial album
(search albums have one of the most significant bits set to get unique ids, so the numbers are huge)
Comment 2 Andi Clemens 2011-06-12 09:06:31 UTC
After deleting my config file, it seemed to work, but after a restart the similar search came to front again.

I will create a new config file now and diff it against the one with the similar search result...

Andi
Comment 3 Andi Clemens 2011-06-12 09:13:46 UTC
Created attachment 60923 [details]
Here is my rc diff
Comment 4 Andi Clemens 2011-06-12 09:14:33 UTC
aaaaa.rc is the old file...
Comment 5 Marcel Wiesweg 2011-06-19 16:22:48 UTC
That does not really explain it: 3251 is obviously a PAlbum (searches have bit 30 set). 
You could play with gdb from which places AlbumManager::setCurrentAlbum() is called at startup.
Comment 6 caulier.gilles 2011-12-14 16:34:09 UTC
i can reproduce it with 2.5.0...

Gilles Caulier
Comment 7 Marcel Wiesweg 2012-05-07 17:37:40 UTC
Git commit a660eaa233ec1aa0a39083d58bcc37f6eb7de620 by Marcel Wiesweg.
Committed on 06/05/2012 at 20:30.
Pushed by mwiesweg into branch 'master'.

Fix involuntary overwriting of current album at startup when similar search was active

Loading state sets the value of the spin box, triggering a signal, starting a timer,
which after its interval changed the current album even if the sidebar was not active.
Fixes some other problems as well.

M  +2    -1    NEWS
M  +15   -6    digikam/utils/searchmodificationhelper.cpp
M  +12   -13   utilities/fuzzysearch/fuzzysearchview.cpp

http://commits.kde.org/digikam/a660eaa233ec1aa0a39083d58bcc37f6eb7de620