diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-07-20 02:26:13 (GMT) |
---|---|---|
committer | Toby Tomkins <toby.tomkins@nokia.com> | 2010-07-26 06:24:12 (GMT) |
commit | 19835bd63a99e1b71b80f68fac249f4d207975ec (patch) | |
tree | e37666345642298557c2c533cbb4511eaab63a78 /src | |
parent | 49d1825841a800ac41d15c5bb6e76628c6bb4859 (diff) | |
download | Qt-19835bd63a99e1b71b80f68fac249f4d207975ec.zip Qt-19835bd63a99e1b71b80f68fac249f4d207975ec.tar.gz Qt-19835bd63a99e1b71b80f68fac249f4d207975ec.tar.bz2 |
Ensure the boundingRect() of Text is correctly calculated.
We need to create our cached image in boundingRect() if it doesn't
already exist, to prevents painting errors.
Reviewed-by: Warwick Allison
(cherry picked from commit 6c3cf7e2c5868bc77ffa66059889eda3132531b3)
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetext.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index cf630c8..9b0391d 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -713,6 +713,8 @@ QRectF QDeclarativeText::boundingRect() const // Could include font max left/right bearings to either side of rectangle. if (d->cache || d->style != Normal) { + QDeclarativeTextPrivate *dd = const_cast<QDeclarativeTextPrivate *>(d); + dd->checkImgCache(); switch (d->hAlign) { case AlignLeft: x = 0; |