summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@trolltech.com>2009-04-15 12:14:27 (GMT)
committerAlexis Menard <alexis.menard@trolltech.com>2009-04-15 12:19:12 (GMT)
commit36b16a126e24cb8d8e5c34cfd807bc7c51ea49cf (patch)
treef911a31464dd0de8a0ee8bd7af48ec075c493317 /src/gui
parent4cb80de7ade662deb5542f77cd3a36517fa9cd9b (diff)
downloadQt-36b16a126e24cb8d8e5c34cfd807bc7c51ea49cf.zip
Qt-36b16a126e24cb8d8e5c34cfd807bc7c51ea49cf.tar.gz
Qt-36b16a126e24cb8d8e5c34cfd807bc7c51ea49cf.tar.bz2
Update the item if the text has changed but the boundingRect is the
same. updateBoudingRect update the item only if the boundingRect change but if we have 123 as an initial text and then we set 321 as the new text, then nothing happen because the rect is the same. In case the boundingRect change then we call update 2 times but the item is already dirty so the second call will just return. BT:yes Reviewed-by: Andreas
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index e6bcaa6..d1b8393 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -8489,6 +8489,7 @@ void QGraphicsSimpleTextItem::setText(const QString &text)
return;
d->text = text;
d->updateBoundingRect();
+ update();
}
/*!