diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2010-11-03 04:55:46 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2010-11-03 04:55:46 (GMT) |
commit | af15292e4982c11542487d39fc76ccfb8516598f (patch) | |
tree | aa22c66c8f6a0230fdb63162b8794e2d76155bdb /src/declarative/graphicsitems/qdeclarativetextlayout.cpp | |
parent | b2016bbfc9c7389e7b64451417395ceba96af21f (diff) | |
download | Qt-af15292e4982c11542487d39fc76ccfb8516598f.zip Qt-af15292e4982c11542487d39fc76ccfb8516598f.tar.gz Qt-af15292e4982c11542487d39fc76ccfb8516598f.tar.bz2 |
Regression: QDeclarativeText does not update when text turns empty
Task-number: QTBUG-14865
Reviewed-by: Michael Brasser
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetextlayout.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextlayout.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp index 89a2158..db5d75d 100644 --- a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp @@ -285,6 +285,19 @@ void QDeclarativeTextLayout::beginLayout() QTextLayout::beginLayout(); } +void QDeclarativeTextLayout::clearLayout() +{ + if (d && d->cached) { + d->cached = false; + d->items.clear(); + d->positions.clear(); + d->glyphs.clear(); + d->chars.clear(); + d->position = QPointF(); + } + QTextLayout::clearLayout(); +} + void QDeclarativeTextLayout::prepare() { if (!d || !d->cached) { |