[Digikam-devel] [Bug 149685] Go to next photo after current photo deletion (vs. to previous photo)
Arnd Baecker
arnd.baecker at web.de
Sun Sep 9 18:50:54 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
------- Additional Comments From arnd.baecker web de 2007-09-09 19:50 -------
SVN commit 710344 by abaecker:
Deleting an image in showfotos thumbbar, the following image
is made the selected one (and not the previous).
CCBUGS: 149685
TODO:KDE4PORT
M +2 -1 NEWS
M +8 -0 showfoto/showfoto.cpp
--- branches/extragear/kde3/graphics/digikam/NEWS #710343:710344
@ -46,5 +46,6 @
032 ==> 146083 : Bugs in drag and drop.
033 ==> 147854 : Put images into an emptied light-table
034 ==> 149578 : libjpeg JPEG subsampling setting is not user-controlable.
-035 ==>
+035 ==> 149685 : Go to next photo after current photo deletion (vs. to previous photo)
+036 ==>
--- branches/extragear/kde3/graphics/digikam/showfoto/showfoto.cpp #710343:710344
@ -1112,11 +1112,14 @
// No error, remove item in thumbbar.
Digikam::ThumbBarItem *item2remove = d->currentItem;
+ Digikam::ThumbBarItem *nextItem = false;
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;
}
@ -1136,6 +1139,11 @
}
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