if the sub widget can't scroll at all, just ignore the mouse event

svn path=/trunk/KDE/kdelibs/; revision=1041272
This commit is contained in:
Marco Martin 2009-10-27 18:04:02 +00:00
parent 151b9d92bb
commit 25d1f3f5b6

View File

@ -151,6 +151,13 @@ void KineticScrolling::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
d->syncViewportRect();
d->cposition = -d->parent->property("scrollPosition").value<QPointF>();
if (d->cposition == QPointF(0, 0) &&
d->viewportGeometry.width() + 2 >= d->contentsSize.width() &&
d->viewportGeometry.height() + 2 >= d->contentsSize.height()) {
event->ignore();
}
doneOvershoot();
Q_UNUSED(event);
d->count();