ignore the scroll event if the widget is totally scrolled

svn path=/trunk/KDE/kdelibs/; revision=1035777
This commit is contained in:
Marco Martin 2009-10-15 20:46:07 +00:00
parent d7915a8dff
commit 342489ea62

View File

@ -197,7 +197,19 @@ void KineticScrolling::wheelReleaseEvent(QGraphicsSceneWheelEvent *event)
int temp = -event->delta();
if ((event->delta() < 0 && d->canScroll(KineticScrollingPrivate::Down)) ||
(event->delta() > 0 && d->canScroll(KineticScrollingPrivate::Up))){
d->kinMovement.setY(kinMovement().y() + temp);
} else if (!d->canScroll(KineticScrollingPrivate::Down) &&
!d->canScroll(KineticScrollingPrivate::Up)) {
if ((event->delta() < 0 && d->canScroll(KineticScrollingPrivate::Right)) ||
(event->delta() > 0 && d->canScroll(KineticScrollingPrivate::Left))) {
d->kinMovement.setX(kinMovement().x() + temp);
}
} else {
event->ignore();
return;
}
startAnimationTimer(30);
}