diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2014-03-15 01:11:14 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-17 16:27:55 +0100 |
commit | 946c0925548adca627ef6c41b8e73e46cc48dbce (patch) | |
tree | b4d4e5e654a07813b4a6194471f51c2e61f53c10 /src/widgets | |
parent | 0a803dc90a1ce31009a4bea3f43a2f200cb3a22e (diff) |
QGraphicsSimpleTextItem: Fix drawing the outline with pen, when set
QTextLayout's setAdditionalFormats() is expected to invalidate
the shaping results, so that the layouting must be done *after*
the format range(s) gets applied.
Task-number: QTBUG-33475
Change-Id: I6b948fc179da915545a98ac36f2c20163947ec9e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsitem.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp index f1b3d95f9c..d4edc63403 100644 --- a/src/widgets/graphicsview/qgraphicsitem.cpp +++ b/src/widgets/graphicsview/qgraphicsitem.cpp @@ -10778,7 +10778,6 @@ void QGraphicsSimpleTextItem::paint(QPainter *painter, const QStyleOptionGraphic tmp.replace(QLatin1Char('\n'), QChar::LineSeparator); QStackTextEngine engine(tmp, d->font); QTextLayout layout(&engine); - setupTextLayout(&layout); QPen p; p.setBrush(d->brush); @@ -10795,6 +10794,7 @@ void QGraphicsSimpleTextItem::paint(QPainter *painter, const QStyleOptionGraphic layout.setAdditionalFormats(formats); } + setupTextLayout(&layout); layout.draw(painter, QPointF(0, 0)); if (option->state & (QStyle::State_Selected | QStyle::State_HasFocus)) |