aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktext.cpp
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2014-06-24 14:05:43 +0200
committerAndy Shaw <andy.shaw@digia.com>2014-07-24 15:43:09 +0200
commit79f262711c053608c7b0d775a8c7031368ddd17f (patch)
tree5f41f4a9e4792a7cda28124183fb6386d4d7083c /src/quick/items/qquicktext.cpp
parent2c80968d21ff15f574cbbfd93ce4409cda7eeebf (diff)
Clear the visibleImgTags list when setting up the text layout
Since the text layout is being redone then the visibleImgTags will be repopulated, therefore it should be cleared first so that it doesn't have duplicated entries. Change-Id: I415f94326e156ae265bc044544f2bb0d7146ce4c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/quick/items/qquicktext.cpp')
-rw-r--r--src/quick/items/qquicktext.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index e26ad2769a..71265689e9 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -711,7 +711,8 @@ QRectF QQuickTextPrivate::setupTextLayout(qreal *const baseline)
}
bool shouldUseDesignMetrics = renderType != QQuickText::NativeRendering;
-
+ if (!visibleImgTags.isEmpty())
+ visibleImgTags.clear();
layout.setCacheEnabled(true);
QTextOption textOption = layout.textOption();
if (textOption.alignment() != q->effectiveHAlign()