summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qplaintextedit.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-05-05 16:30:28 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-05 16:30:28 (GMT)
commit9e95890804d8b5114f8090496b82327178055348 (patch)
treedbc17e0bceadcbd771e45a29cb1addcdd7fa18c2 /src/gui/widgets/qplaintextedit.cpp
parent671fff6071d1064094bf41364b11df3b55e7a65c (diff)
parentd1ac6af4f30e822e161fd8772104aa2e30e55a2f (diff)
downloadQt-9e95890804d8b5114f8090496b82327178055348.zip
Qt-9e95890804d8b5114f8090496b82327178055348.tar.gz
Qt-9e95890804d8b5114f8090496b82327178055348.tar.bz2
Merge remote-tracking branch 'origin/4.8'
Diffstat (limited to 'src/gui/widgets/qplaintextedit.cpp')
-rw-r--r--src/gui/widgets/qplaintextedit.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index 9871ed3..51c4ccb 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -649,6 +649,11 @@ void QPlainTextEditPrivate::setTopBlock(int blockNumber, int lineNumber, int dx)
}
control->topBlock = blockNumber;
topLine = lineNumber;
+
+ bool vbarSignalsBlocked = vbar->blockSignals(true);
+ vbar->setValue(block.firstLineNumber() + lineNumber);
+ vbar->blockSignals(vbarSignalsBlocked);
+
if (dx || dy)
viewport->scroll(q->isRightToLeft() ? -dx : dx, dy);
else