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

Gilles Caulier caulier.gilles at free.fr
Wed Mar 1 17:08:55 GMT 2006


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: digikam-devel at kde.org,  Mikolaj Machowski <mikmach at wp.pl>

 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);
 }



More information about the Digikam-devel mailing list