[Digikam-devel] extragear/graphics/digikam/digikam
Gilles Caulier
caulier.gilles at free.fr
Wed Aug 23 15:09:02 BST 2006
SVN commit 576224 by cgilles:
digikam from trunk : iconview : ensure that the current selected item from the icon view is always visible when the sidebar size is changed.
CCMAIL: digikam-devel at kde.org
M +22 -19 iconview.cpp
--- trunk/extragear/graphics/digikam/digikam/iconview.cpp #576223:576224
@@ -59,25 +59,25 @@
IconViewPriv()
{
- firstGroup = 0;
- lastGroup = 0;
- currItem = 0;
- anchorItem = 0;
- firstVisibleItem = 0;
- clearing = false;
- spacing = 10;
+ firstGroup = 0;
+ lastGroup = 0;
+ currItem = 0;
+ anchorItem = 0;
+ firstVisibleItem = 0;
+ clearing = false;
+ spacing = 10;
- rubber = 0;
- dragging = false;
- pressedMoved = false;
+ rubber = 0;
+ dragging = false;
+ pressedMoved = false;
- firstContainer = 0;
- lastContainer = 0;
+ firstContainer = 0;
+ lastContainer = 0;
- showTips = false;
- toolTipItem = 0;
- toolTipTimer = 0;
- updateTimer = 0;
+ showTips = false;
+ toolTipItem = 0;
+ toolTipTimer = 0;
+ updateTimer = 0;
updateTimerInterval = 0;
}
@@ -154,10 +154,10 @@
d->toolTipTimer = new QTimer(this);
connect(d->updateTimer, SIGNAL(timeout()),
- SLOT(slotUpdate()));
+ this, SLOT(slotUpdate()));
connect(d->toolTipTimer, SIGNAL(timeout()),
- SLOT(slotToolTip()));
+ this, SLOT(slotToolTip()));
setEnableToolTips(true);
}
@@ -205,7 +205,7 @@
void IconView::setCurrentItem(IconItem* item)
{
- d->currItem = item;
+ d->currItem = item;
d->anchorItem = d->currItem;
if (d->currItem)
@@ -747,6 +747,9 @@
{
QScrollView::resizeEvent(e);
rearrangeItems();
+
+ if (d->currItem)
+ ensureItemVisible(d->currItem);
}
void IconView::rebuildContainers()
More information about the Digikam-devel
mailing list