Bug 120074

Summary: new tag doesn't appear
Product: [Applications] digikam Reporter: Maxime Delorme <maximedelorme>
Component: Tags-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 0.9.0
Attachments: the result left panel are not same as right panel

Description Maxime Delorme 2006-01-14 00:01:27 UTC
Version:           0.8.1 (using KDE KDE 3.5.0)
Installed from:    Ubuntu Packages

When I create the _first_ tag with RMB in the right panel (filter tag)
with albums view or tag view (on left panel), then when I switch to tag view (on left panel) the left panel is not updated
Comment 1 Maxime Delorme 2006-01-14 00:02:58 UTC
Created attachment 14243 [details]
the result left panel are not same as right panel
Comment 2 caulier.gilles 2006-08-28 13:03:51 UTC
Maxime, 

I cannot reproduce this problem with digiKam 0.9.0 from svn trunk.

Gilles
Comment 3 Maxime Delorme 2006-08-29 22:38:58 UTC
Still exist with version from http://kubuntu.omat.nl/dapper
Comment 4 Maxime Delorme 2006-08-29 22:44:00 UTC
Steps to reproduce : 
- Go to configure Digikam set Directory to a new one to be sure that's a real new one
- Set letft and right panel with tags view and tags filter
- Create a tag on right panel with RMB, nothing append on left panel
Comment 5 caulier.gilles 2006-08-30 13:20:01 UTC
ok, i can reproduce it

Gilles
Comment 6 Marcel Wiesweg 2006-08-30 19:22:56 UTC
SVN commit 578959 by mwiesweg:

- when setting the iconKDE string, reset the icon ID to 0, which has precedence
- set root item to "open" initially. (If items are added in TagFolderView,
  ensureItemVisible is called. TagFilterView has no root item. So this appeared only
  when creating the very first item from TagFilterView)

BUG: 120075, 120074


 M  +1 -1      albumdb.cpp  
 M  +2 -0      tagfolderview.cpp  


--- trunk/extragear/graphics/digikam/digikam/albumdb.cpp #578958:578959
@@ -503,7 +503,7 @@
 {
     if (!iconKDE.isEmpty())
     {
-        execSql( QString("UPDATE Tags SET iconkde='%1' WHERE id=%2;")
+        execSql( QString("UPDATE Tags SET iconkde='%1', icon=0 WHERE id=%2;")
                  .arg(escapeString(iconKDE), 
                       QString::number(tagID)));
     }
--- trunk/extragear/graphics/digikam/digikam/tagfolderview.cpp #578958:578959
@@ -173,6 +173,8 @@
     {
         item = new TagFolderViewItem(this, tag);
         tag->setExtraData(this, item);
+        // Toplevel tags are all children of root, and should always be visible - set root to open
+        item->setOpen(true);
     }
     else
     {