[Digikam-devel] extragear/graphics/digikam/utilities/cameragui

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] extragear/graphics/digikam/utilities/cameragui

Gilles Caulier
SVN commit 514846 by cgilles:

digikam from trunk : BugFix : Refresh properly current album icon view when Navigate buttons from camera interface are used. The problem isn't really a problem with the current selection : the item selection is right, but the current album items aren't properlly refresh (similar problem than image properties side bar from main interface and IE).

CCMAIL: [hidden email],  Mikolaj Machowski <[hidden email]>

 M  +13 -15    cameraui.cpp  


--- trunk/extragear/graphics/digikam/utilities/cameragui/cameraui.cpp #514845:514846
@@ -890,37 +890,35 @@
 void CameraUI::slotFirstItem(void)
 {
     CameraIconViewItem *currItem = dynamic_cast<CameraIconViewItem*>(d->view->firstItem());
+    d->view->clearSelection();
+    d->view->updateContents();
     if (currItem)
        d->view->setCurrentItem(currItem);
 }
 
 void CameraUI::slotPrevItem(void)
 {
-    IconItem* prevItem = 0;
-    IconItem *currItem = d->view->currentItem();
-    if (currItem)
-    {
-       prevItem = currItem->prevItem();
-       if (prevItem)
-           d->view->setCurrentItem(prevItem);
-    }
+    CameraIconViewItem *currItem = dynamic_cast<CameraIconViewItem*>(d->view->currentItem());
+    d->view->clearSelection();
+    d->view->updateContents();
+    if (currItem)
+       d->view->setCurrentItem(currItem->prevItem());
 }
 
 void CameraUI::slotNextItem(void)
 {
-    IconItem* nextItem = 0;
-    IconItem *currItem = d->view->currentItem();
+    CameraIconViewItem *currItem = dynamic_cast<CameraIconViewItem*>(d->view->currentItem());
+    d->view->clearSelection();
+    d->view->updateContents();
     if (currItem)
-    {
-       nextItem = currItem->nextItem();
-       if (nextItem)
-           d->view->setCurrentItem(nextItem);
-    }
+       d->view->setCurrentItem(currItem->nextItem());
 }
 
 void CameraUI::slotLastItem(void)
 {
     CameraIconViewItem *currItem = dynamic_cast<CameraIconViewItem*>(d->view->lastItem());
+    d->view->clearSelection();
+    d->view->updateContents();
     if (currItem)
        d->view->setCurrentItem(currItem);
 }
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel