Bug 229574

Summary: Moving tags doesn't update the "tag counter" next to the tag name
Product: [Applications] digikam Reporter: Andi Clemens <andi.clemens>
Component: Tags-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: languitar
Priority: NOR    
Version: 1.3.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 1.2.0

Description Andi Clemens 2010-03-05 16:52:07 UTC
Version:            (using KDE 4.4.1)
OS:                Linux
Installed from:    Archlinux Packages

The tag counter next to the tag name in the tag folder view is not updated when the tag is moved to another position / parent.

The counter reads "0" until digiKam is restarted.
Comment 1 Marcel Wiesweg 2010-03-06 14:51:45 UTC
Johannes, I remember you have done some changes to AlbumManager to cache the result of the count maps. This should have fixed problems like this?
Comment 2 Johannes Wienke 2010-03-06 16:54:50 UTC
I don't know what's going on here. Need to have a look at this but currently I don't have that much time any more as I started working on my master thesis.
Comment 3 Johannes Wienke 2010-03-06 18:15:05 UTC
SVN commit 1100051 by jwienke:

Update tag count after moving.

Marcel, can this be a performance problem? For me this was nearly instant. The thing is, normally we know the counts before moving, so we could manipulate the count map directly, but this is the more safe way to my mind.

CCMAIL: marcel.wiesweg@gmx.net
BUG: 229574

 M  +2 -4      NEWS  
 M  +3 -0      digikam/albummanager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1100051
Comment 4 Marcel Wiesweg 2010-03-07 13:22:52 UTC
The tag map should not be changed at all when moving, shouldn't it? So there is no need to update the map from AlbumManager, if I did not miss something.
But yes, the parents in the model need to re-count their children.
Comment 5 Johannes Wienke 2010-03-07 13:26:10 UTC
I don't know. ;) I didn't really look into how this is computed. So you mean this is more an issue of AbstractCountingAlbumModel?
Comment 6 Marcel Wiesweg 2010-03-07 14:25:20 UTC
SVN commit 1100402 by mwiesweg:

No need to regenerate the map (which can be costly) but
just update the state with the stored map.

CCBUG: 229574

 M  +0 -3      digikam/albummanager.cpp  
 M  +15 -3     libs/models/abstractalbummodel.cpp  
 M  +4 -0      libs/models/abstractalbummodel.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1100402