Bug 226515

Summary: My tags on Caption/Tags becomes empty after removing a single tag
Product: [Applications] digikam Reporter: terri.bugs
Component: Tags-CaptionsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, marcel.wiesweg
Priority: NOR    
Version: 1.2.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 1.2.0
Sentry Crash Report:

Description terri.bugs 2010-02-12 12:23:16 UTC
Version:           Version 1.2.0 (rev.: 1086154) (using KDE 4.3.2)
OS:                Linux
Installed from:    Ubuntu Packages

After I removed a single tag from a single image (and applied that change with Apply-button) My Tags -hierarchy in the right sidepanel "Caption/Tags" was gone. Even selecting a file or multiple files (with tags) and then Read metadata from file to database doesn't give me any tags in My Tags. However, the right sidepanel "Tag Filter" shows all tags as they were & works fine as does the left sidepanel "Tags". After restarting digikam My Tags looks and works as it should.
Comment 1 terri.bugs 2010-02-12 12:41:42 UTC
I removed the tag by first unassigning it, not applying that change and then removing the tag answering yes to question if I want to remove a tag assigned to one item. My Tags empties after I answer yes to the question if I want to apply my changes. 
Program crashed while testing the mechanism of this bug. Previously (5x?) it only cleared My Tag tree. The crash is probably due to bug 214340. These bugs may be connected and have the same underlying cause.
Comment 2 Marcel Wiesweg 2010-02-12 18:29:26 UTC
Was the tree view literally empty, or was there one single entry "My Tags"?
In the latter case, this is probably 226363.
Comment 3 terri.bugs 2010-02-12 18:40:46 UTC
There was single entry "My Tags". Sorry, I overlooked that one :)
Comment 4 terri.bugs 2010-02-12 18:57:13 UTC
There are two differences compared to 226363. 
1) Nothing happens when one clicks or double clicks the "My Tags" -tag. 
2) "My Tags" -tag has a checkbox before it (similar to normal tags). However, it is impossible to apply the tag "My Tags" to any image. The whole window is grey.
Comment 5 Johannes Wienke 2010-02-12 21:17:38 UTC
Marcel, this check box is also something that really needs to be fixed. Can we remove this for only one entry in the model? I wasn't successful trying to accomplish this.
Comment 6 Marcel Wiesweg 2010-02-12 23:13:35 UTC
SVN commit 1089331 by mwiesweg:

Remove the check box from root item if root is not checkable.
QStyledItemDelegate does this:
        QVariant value = index.data(Qt::CheckStateRole);
        if (value.isValid() && !value.isNull()) {
            v4->features |= QStyleOptionViewItemV2::HasCheckIndicator;
so we need to return a null QVariant for the CheckStateRole

CCBUG: 226515

 M  +2 -1      abstractalbummodel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1089331
Comment 7 terri.bugs 2010-02-13 14:47:41 UTC
I updated to svn 1089461 and now there is always only one item in the "My Tags" window. Even after restart no tags appear to the window, its permanently empty of normal tags. 
However, you have successfully removed the checkbox before it. Now there is a nice icon :)
Comment 8 terri.bugs 2010-02-15 11:58:01 UTC
Updated to digiKam Version 1.2.0 (rev.: 1090187) and the bug is fixed. Tag tree is shown as it should be and removing tag (or tags) works as it should. 

Should I close the bug as resolved if I can't reproduce the bug anymore or is that something you guys want to do?
Comment 9 caulier.gilles 2010-02-15 12:00:33 UTC
I think it's fine to close it as well. Marcel has commited change to svn and CC this entry accordingly.

Don't hesitate to re-open it if necessary.

And thanks to make regression tests to new album tree-view based model view implementation with digiKam 1.2.0

Gilles Caulier