diff options
author | mae <qt-info@nokia.com> | 2009-07-02 13:55:19 (GMT) |
---|---|---|
committer | mae <qt-info@nokia.com> | 2009-07-02 17:25:57 (GMT) |
commit | 8f7ed011e38021f19f50b22d8a5c00d8ccd366ed (patch) | |
tree | 36083c47cd8f893270d6780dfe3bc7533ba5a31d /src/gui/widgets | |
parent | 69b4be80a445985bdb8632dab4104236fe9b054d (diff) | |
download | Qt-8f7ed011e38021f19f50b22d8a5c00d8ccd366ed.zip Qt-8f7ed011e38021f19f50b22d8a5c00d8ccd366ed.tar.gz Qt-8f7ed011e38021f19f50b22d8a5c00d8ccd366ed.tar.bz2 |
QPlainTextEdit pixel dust redrawing problem on clear()
With document margins, the mapping from content-coordinates to visual
coordinates went wrong.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qplaintextedit.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp index c9d1d6e..82026d4 100644 --- a/src/gui/widgets/qplaintextedit.cpp +++ b/src/gui/widgets/qplaintextedit.cpp @@ -252,7 +252,7 @@ QPlainTextDocumentLayoutPrivate *QPlainTextDocumentLayout::priv() const */ void QPlainTextDocumentLayout::requestUpdate() { - emit update(QRectF(0., -4., 1000000000., 1000000000.)); + emit update(QRectF(0., -document()->documentMargin(), 1000000000., 1000000000.)); } @@ -347,8 +347,7 @@ void QPlainTextDocumentLayout::documentChanged(int from, int /*charsRemoved*/, i } if (!d->blockUpdate) - emit update(); // optimization potential - + emit update(QRectF(0., -doc->documentMargin(), 1000000000., 1000000000.)); // optimization potential } |