diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-16 12:30:44 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-16 12:30:44 (GMT) |
commit | dda010b51b8e3ec6955b64290ad47c0f43dcda73 (patch) | |
tree | 6c23a2bccc2445090c34c5841917c3b694ec185d | |
parent | 140a96d0b860b045c18d53c1ac96e77b3893d31c (diff) | |
parent | fa175f7c09e6e664f347ac9804b1a7db1d997ef2 (diff) | |
download | Qt-dda010b51b8e3ec6955b64290ad47c0f43dcda73.zip Qt-dda010b51b8e3ec6955b64290ad47c0f43dcda73.tar.gz Qt-dda010b51b8e3ec6955b64290ad47c0f43dcda73.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
QScrollArea: Excessive scrolling in focusNextPrevChild()
-rw-r--r-- | src/gui/widgets/qscrollarea.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/qscrollarea.cpp b/src/gui/widgets/qscrollarea.cpp index 6b81d9f..38e799e 100644 --- a/src/gui/widgets/qscrollarea.cpp +++ b/src/gui/widgets/qscrollarea.cpp @@ -482,14 +482,14 @@ void QScrollArea::ensureWidgetVisible(QWidget *childWidget, int xmargin, int yma d->hbar->setValue(focusRect.center().x() - d->viewport->width() / 2); else if (focusRect.right() > visibleRect.right()) d->hbar->setValue(focusRect.right() - d->viewport->width()); - else + else if (focusRect.left() < visibleRect.left()) d->hbar->setValue(focusRect.left()); if (focusRect.height() > visibleRect.height()) d->vbar->setValue(focusRect.center().y() - d->viewport->height() / 2); else if (focusRect.bottom() > visibleRect.bottom()) d->vbar->setValue(focusRect.bottom() - d->viewport->height()); - else + else if (focusRect.top() < visibleRect.top()) d->vbar->setValue(focusRect.top()); } |