summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qpainter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 7b5fcc2..898a996 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -5844,6 +5844,11 @@ void QPainter::drawStaticText(const QPointF &topLeftPosition, const QStaticText
QStaticTextPrivate *staticText_d =
const_cast<QStaticTextPrivate *>(QStaticTextPrivate::get(&staticText));
+ if (font() != staticText_d->font) {
+ staticText_d->font = font();
+ staticText_d->needsRelayout = true;
+ }
+
// If we don't have an extended paint engine, or if the painter is projected,
// we go through standard code path
if (d->extended == 0 || !d->state->matrix.isAffine()) {
@@ -5880,11 +5885,6 @@ void QPainter::drawStaticText(const QPointF &topLeftPosition, const QStaticText
staticTextNeedsReinit = true;
}
- if (font() != staticText_d->font) {
- staticText_d->font = font();
- staticTextNeedsReinit = true;
- }
-
// Recreate the layout of the static text because the matrix or font has changed
if (staticTextNeedsReinit)
staticText_d->init();