summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2009-05-06 08:13:43 (GMT)
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2009-05-06 08:22:08 (GMT)
commitbd29efb125142c936a57a9e6ad35c3f9f76b8e17 (patch)
tree55770e00182d2910ec1ca05dfb4e6281cec641f9
parentffbb3c1a2aee4134dce80cd144a26bf32865b698 (diff)
downloadQt-bd29efb125142c936a57a9e6ad35c3f9f76b8e17.zip
Qt-bd29efb125142c936a57a9e6ad35c3f9f76b8e17.tar.gz
Qt-bd29efb125142c936a57a9e6ad35c3f9f76b8e17.tar.bz2
Fixed scrolling performance issue related to hidden blocks
Due to a wrong lookup (confusing line and block number) the scroll optimization was broken, causing the entire view to be updated. Reviewed-by: Thorbjørn Lindeijer
-rw-r--r--src/gui/widgets/qplaintextedit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index 2e9201d..e563fa1 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -624,7 +624,7 @@ void QPlainTextEditPrivate::setTopBlock(int blockNumber, int lineNumber, int dx)
if (viewport->updatesEnabled() && viewport->isVisible()) {
int dy = 0;
- if (doc->findBlockByLineNumber(control->topBlock).isValid()) {
+ if (doc->findBlockByNumber(control->topBlock).isValid()) {
dy = (int)(-q->blockBoundingGeometry(block).y())
+ verticalOffset() - verticalOffset(blockNumber, lineNumber);
}