summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@nokia.com>2009-11-17 16:17:16 (GMT)
committerYoann Lopes <yoann.lopes@nokia.com>2009-11-17 16:24:39 (GMT)
commit162071d2651645358a0935b27af8a3b47474a10f (patch)
tree1d3465f815ed277f51ed4c16e6a1af1cc4999008 /src/gui
parent5f2489ef78956223d7f52ed02c1e580921883803 (diff)
downloadQt-162071d2651645358a0935b27af8a3b47474a10f.zip
Qt-162071d2651645358a0935b27af8a3b47474a10f.tar.gz
Qt-162071d2651645358a0935b27af8a3b47474a10f.tar.bz2
Fixes polish events for explicitly hidden GraphicsWidgetItems.
The problem was that hidden items never get added to "unpolishedItems" list and thus never get the polish event. Autotest included. Task-number: QTBUG-3939 Reviewed-by: bnilsen
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 5b0643d..a463c01 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -2556,11 +2556,9 @@ void QGraphicsScene::addItem(QGraphicsItem *item)
item->d_ptr->resolveFont(d->font.resolve());
item->d_ptr->resolvePalette(d->palette.resolve());
- if (!item->d_ptr->explicitlyHidden) {
- if (d->unpolishedItems.isEmpty())
- QMetaObject::invokeMethod(this, "_q_polishItems", Qt::QueuedConnection);
- d->unpolishedItems.insert(item);
- }
+ if (d->unpolishedItems.isEmpty())
+ QMetaObject::invokeMethod(this, "_q_polishItems", Qt::QueuedConnection);
+ d->unpolishedItems.insert(item);
// Reenable selectionChanged() for individual items
--d->selectionChanging;