if the widget can't scroll neither up or down, don't attempt to bounce

svn path=/trunk/KDE/kdelibs/; revision=1051560
This commit is contained in:
Marco Martin 2009-11-19 19:55:54 +00:00
parent ea0494d0fb
commit 3b7483877d

View File

@ -146,6 +146,11 @@ void KineticScrolling::overshoot()
{
QPointF scrollPosition = -d->parent->property("scrollPosition").value<QPointF>();
if (!d->canScroll(KineticScrollingPrivate::Down) &&
!d->canScroll(KineticScrollingPrivate::Up)) {
return;
}
if (d->bounceStatus != KineticScrollingPrivate::Running) {
if ((d->cposition.y() > 0 ) || (d->cposition.y() <= d->minimum.y() + d->overshoot)) {
QPointF finalPosition;