fix clicked painting when set to double click, patch by Lindsay Roberts

BUG:256297

svn path=/trunk/KDE/kdebase/apps/; revision=1196275
This commit is contained in:
Aaron J. Seigo 2010-11-12 22:17:20 +00:00
parent e277118343
commit 42d534c535

View file

@ -1837,7 +1837,12 @@ void IconView::mousePressEvent(QGraphicsSceneMouseEvent *event)
else {
markAreaDirty(visualRect(index));
}
m_pressedIndex = index;
if (!(event->modifiers() & (Qt::ControlModifier | Qt::ShiftModifier)) &&
KGlobalSettings::singleClick()) {
m_pressedIndex = index;
}
m_buttonDownPos = pos;
return;
}
@ -1932,6 +1937,8 @@ void IconView::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
return;
}
m_pressedIndex = index;
// Activate the item
emit activated(index);