Bug 112971 - after rotating an image, the first image in the folder get's the keyboard focus
Summary: after rotating an image, the first image in the folder get's the keyboard focus
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-IconView (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-21 02:22 UTC by Achim Bohnet
Modified: 2017-08-14 21:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Achim Bohnet 2005-09-21 02:22:23 UTC
Version:           0.8.0-beta2 (using KDE 3.4.2, Kubuntu Package 4:3.4.2-0ubuntu0hoary2 )
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-8ubuntu2)
OS:                Linux (i686) release 2.6.10-5-686

Hi,
happens on hoary and breezy:

o select a (bigger) folder and scroll down
o select a picture and rotate it e.g. 90 clock wise
o use right arrow to move to the next picture
==> bug: folder view jumps to the 2nd picture
in the folder.

After the rotation the keyboard focus is no longer
on the image just rotated but on the first in the
folder.

This makes prevents keyboard navigation with
right arrow and 1 2 3 shortcuts for rotation
(worked fine in 0.7.* releases)

Achim
Comment 1 Gerhard Kulzer 2005-09-21 06:36:57 UTC
Am Mittwoch, 21. September 2005 02.22 schrieb Achim Bohnet:
> Version:           0.8.0-beta2 (using KDE 3.4.2, Kubuntu Package
> 4:3.4.2-0ubuntu0hoary2 ) Compiler:          gcc version 3.3.5 (Debian
> 1:3.3.5-8ubuntu2)
> OS:                Linux (i686) release 2.6.10-5-686
>
> Hi,
> happens on hoary and breezy:
>
> o select a (bigger) folder and scroll down
> o select a picture and rotate it e.g. 90 clock wise
> o use right arrow to move to the next picture
> ==> bug: folder view jumps to the 2nd picture
> in the folder.
>
> After the rotation the keyboard focus is no longer
> on the image just rotated but on the first in the
> folder.
>
> This makes prevents keyboard navigation with
> right arrow and 1 2 3 shortcuts for rotation
> (worked fine in 0.7.* releases)
>

I confirm this bug on Debian sid and Kde 3.4.2

Gerhard
Comment 2 Renchi Raju 2005-09-21 15:50:43 UTC
SVN commit 462605 by pahlibar:

do not lose current item on a re-sort of items

BUGS: 112971 105663


 M  +12 -5     iconview.cpp  


--- trunk/extragear/graphics/digikam/digikam/iconview.cpp #462604:462605
@@ -516,12 +516,19 @@
     
     delete [] groups;
 
-    // set the currItem to first item
-    
-    d->currItem = 0;
-    if (d->firstGroup)
-        d->currItem = d->firstGroup->firstItem();
+    if (!d->currItem)
+    {
+        // set the currItem to first item
+        if (d->firstGroup)
+            d->currItem = d->firstGroup->firstItem();
+    }
     d->anchorItem = d->currItem;
+
+    if (d->currItem)
+    {
+        d->currItem->setSelected(true, true);
+        ensureItemVisible(d->currItem);
+    }
 }
 
 void IconView::slotUpdate()