diff options
author | mae <qt-info@nokia.com> | 2009-05-06 08:13:43 (GMT) |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com> | 2009-05-06 08:22:08 (GMT) |
commit | bd29efb125142c936a57a9e6ad35c3f9f76b8e17 (patch) | |
tree | 55770e00182d2910ec1ca05dfb4e6281cec641f9 /src/gui/widgets | |
parent | ffbb3c1a2aee4134dce80cd144a26bf32865b698 (diff) | |
download | Qt-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
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qplaintextedit.cpp | 2 |
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); } |