diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-05-31 05:38:45 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-05-31 05:38:45 (GMT) |
commit | a0b725d916ec794c1a0f02b37525a15ad27d145d (patch) | |
tree | 81010ed6d5c83af8fd2dd321956625aae6ddf4fe /src/declarative/graphicsitems/qdeclarativetextedit.cpp | |
parent | 79a587d813c2df9c45fea7423e5e6c40e2d2b67b (diff) | |
download | Qt-a0b725d916ec794c1a0f02b37525a15ad27d145d.zip Qt-a0b725d916ec794c1a0f02b37525a15ad27d145d.tar.gz Qt-a0b725d916ec794c1a0f02b37525a15ad27d145d.tar.bz2 |
Repaint all text when Ctrl+A is pressed in TextEdit
QTextControl::updateRequest() with empty rect means update all.
Task-number: QTBUG-11013
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetextedit.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextedit.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 167db77..f02b7d1 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -1066,9 +1066,14 @@ void QDeclarativeTextEdit::drawContents(QPainter *painter, const QRect &bounds) void QDeclarativeTextEdit::updateImgCache(const QRectF &rf) { Q_D(const QDeclarativeTextEdit); - QRect r = rf.toRect(); - if (r != QRect(0,0,INT_MAX,INT_MAX)) // Don't translate "everything" - r = r.translated(0,d->yoff); + QRect r; + if (!rf.isValid()) { + r = QRect(0,0,INT_MAX,INT_MAX); + } else { + r = rf.toRect(); + if (r != QRect(0,0,INT_MAX,INT_MAX)) // Don't translate "everything" + r = r.translated(0,d->yoff); + } dirtyCache(r); emit update(); } |