[Digikam-devel] [Bug 149685] Go to next photo after current photo deletion (vs. to previous photo)

Gilles Caulier caulier.gilles at gmail.com
Sun Sep 9 21:15:38 BST 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=149685         
caulier.gilles gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From caulier.gilles gmail com  2007-09-09 22:15 -------
SVN commit 710382 by cgilles:

backport commits #710344 to trunk. 
BUG: 149685


 M  +7 -0      showfoto.cpp  


--- trunk/extragear/graphics/digikam/showfoto/showfoto.cpp #710381:710382
 @ -1139,11 +1139,14  @
     // No error, remove item in thumbbar.
 
     Digikam::ThumbBarItem *item2remove = d->currentItem;
+    Digikam::ThumbBarItem *nextItem    = 0;
 
     for (Digikam::ThumbBarItem *item = d->thumbBar->firstItem(); item; item = item->next())
     {
         if (item->url().equals(item2remove->url()))
         {
+            // Find item next to the current item
+            nextItem = item->next();
             d->thumbBar->removeItem(item);
             break;
         }
 @ -1163,6 +1166,10  @
     }
     else
     {
+        // If there is an image after the deleted one, make that selected.
+        if (nextItem)
+            d->thumbBar->setSelected(nextItem);
+
         d->currentItem = d->thumbBar->currentItem();
         slotOpenURL(d->currentItem->url());
     }



More information about the Digikam-devel mailing list