Bug 101630 - digikam ui problem selecting images
Summary: digikam ui problem selecting images
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-IconView (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-16 17:59 UTC by olistrut
Modified: 2017-08-06 08:20 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 olistrut 2005-03-16 17:59:51 UTC
Version:            (using KDE KDE 3.3.92)
Installed from:    RedHat RPMs

In the digikam album view (and also in the digikam camera window) there is a problem selecting images with the keyboard: Shift+Cursor correctly selects images but it is not possible to unselect selected images by going back with the cursor.

Example:

 a1 a2 a3
 b1 b2 b3

Use cursor keys to go to image a2. Keep Shift pressed and press right cursor key two times. a2, a3 and b1 are selected. Now (still keeping the shift key pressed) press the left cursor key. In any other application b1 would be unselected. Not so in digikam. There is no visual feedback until the image a1 gets selected.

Not a big issue, but behavior not consistent with other applications. Also when selecting a large number of images it is hard to get the selection right without using the mouse as user does not see the next image to be selected when scrolling and has no way of unselecting a selected image.
Comment 1 Joern Ahrens 2005-03-17 00:26:13 UTC
CVS commit by jahrens: 

This is a workaround, so you can use the keyboard selection. But the whole selection process has to be reworked. So I let this bug open as a reminder.

CCBUG: 101630


  M +1 -1      albumdb.cpp   1.17
  M +38 -2     thumbview.cpp   1.28


--- kdeextragear-3/digikam/digikam/thumbview.cpp  #1.27:1.28
@@ -713,4 +713,10 @@ void ThumbView::contentsMousePressEvent(
                     }
                 }
+//                for (ThumbItem *it = item->next; it; it = it->next) 
+//                {
+//                    if (it->isSelected()) {
+//                        it->setSelected(false, false);
+//                    }
+//                }
             }
             else if (fwdSelection) {
@@ -721,6 +727,14 @@ void ThumbView::contentsMousePressEvent(
                     }
                 }
+//                for (ThumbItem *it = item->prev; it; it = it->prev) 
+//                {
+//                    if (it->isSelected()) {
+//                        it->setSelected(false, false);
+//                    }
+//                }
             }
             else {
+                // No other item is selected, invert the selection 
+                // of the current item
                 item->setSelected(!item->isSelected(), false);
             }
@@ -1311,6 +1325,12 @@ void ThumbView::keyPressEvent(QKeyEvent 
     case Key_Right: {
         ThumbItem *item = currItem ? currItem->next : d->firstItem;
+        
         if (item)
         {
+            if(currItem && currItem->isSelected() && item->isSelected())
+            {
+                currItem->setSelected(false,false);
+            }
+            
             keySelectItem(item, e->state() & Qt::ShiftButton);
             ensureItemVisible(item);
@@ -1322,6 +1342,12 @@ void ThumbView::keyPressEvent(QKeyEvent 
     case Key_Left: {
         ThumbItem *item = currItem ? currItem->prev : d->firstItem;
+        
         if (item)
         {
+            if(currItem && currItem->isSelected() && item->isSelected())
+            {
+                currItem->setSelected(false,false);
+            }
+            
             keySelectItem(item, e->state() & Qt::ShiftButton);
             ensureItemVisible(item);
@@ -1347,4 +1373,9 @@ void ThumbView::keyPressEvent(QKeyEvent 
         if (item)
         {
+            if(currItem && currItem->isSelected() && item->isSelected())
+            {
+                currItem->setSelected(false,false);
+            }
+
             keySelectItem(item, e->state() & Qt::ShiftButton);
             ensureItemVisible(item);
@@ -1371,4 +1402,9 @@ void ThumbView::keyPressEvent(QKeyEvent 
         if (item)
         {
+            if(currItem && currItem->isSelected() && item->isSelected())
+            {
+                currItem->setSelected(false,false);
+            }
+            
             keySelectItem(item, e->state() & Qt::ShiftButton);
             ensureItemVisible(item);
Comment 2 Renchi Raju 2005-04-26 18:06:02 UTC
sensible keyboard handling implemented in experimental branch