[Digikam-devel] extragear/graphics/digikam/digikam
Gilles Caulier
caulier.gilles at free.fr
Tue Feb 28 14:55:46 GMT 2006
SVN commit 514471 by cgilles:
digikam from trunk : BugFix : Refresh properly current album icon view when Navigate buttons from image properties sidebar 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.
Mikolaj, you have reported this problem any time in devel mailing list, please give me a feedback. I'm not sure if you have open a file about in B.K.O. If yes and if this patch work fine for you, please close it.
CCMAIL: digikam-devel at kde.org, Mikolaj Machowski <mikmach at wp.pl>
M +13 -15 digikamview.cpp
--- trunk/extragear/graphics/digikam/digikam/digikamview.cpp #514470:514471
@@ -221,37 +221,35 @@
void DigikamView::slotFirstItem(void)
{
AlbumIconItem *currItem = dynamic_cast<AlbumIconItem*>(mIconView->firstItem());
+ mIconView->clearSelection();
+ mIconView->updateContents();
if (currItem)
mIconView->setCurrentItem(currItem);
}
void DigikamView::slotPrevItem(void)
{
- IconItem* prevItem = 0;
- AlbumIconItem *currItem = mIconView->firstSelectedItem();
- if (currItem)
- {
- prevItem = currItem->prevItem();
- if (prevItem)
- mIconView->setCurrentItem(prevItem);
- }
+ AlbumIconItem *currItem = dynamic_cast<AlbumIconItem*>(mIconView->currentItem());
+ mIconView->clearSelection();
+ mIconView->updateContents();
+ if (currItem)
+ mIconView->setCurrentItem(currItem->prevItem());
}
void DigikamView::slotNextItem(void)
{
- IconItem* nextItem = 0;
- AlbumIconItem *currItem = mIconView->firstSelectedItem();
+ AlbumIconItem *currItem = dynamic_cast<AlbumIconItem*>(mIconView->currentItem());
+ mIconView->clearSelection();
+ mIconView->updateContents();
if (currItem)
- {
- nextItem = currItem->nextItem();
- if (nextItem)
- mIconView->setCurrentItem(nextItem);
- }
+ mIconView->setCurrentItem(currItem->nextItem());
}
void DigikamView::slotLastItem(void)
{
AlbumIconItem *currItem = dynamic_cast<AlbumIconItem*>(mIconView->lastItem());
+ mIconView->clearSelection();
+ mIconView->updateContents();
if (currItem)
mIconView->setCurrentItem(currItem);
}
More information about the Digikam-devel
mailing list