diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-07-20 02:26:13 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-07-20 02:26:13 (GMT) |
commit | 6c3cf7e2c5868bc77ffa66059889eda3132531b3 (patch) | |
tree | e82be2bbef65d4fcd0a505793c8eaae24a21d97f /src/declarative/graphicsitems | |
parent | b2f90dedbeac285338af07fbffaec97ceaf0876f (diff) | |
download | Qt-6c3cf7e2c5868bc77ffa66059889eda3132531b3.zip Qt-6c3cf7e2c5868bc77ffa66059889eda3132531b3.tar.gz Qt-6c3cf7e2c5868bc77ffa66059889eda3132531b3.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
Diffstat (limited to 'src/declarative/graphicsitems')
-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 d63d633..ec8bfb5 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -716,6 +716,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; |