summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index b6a7386..e8ace65 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1522,10 +1522,9 @@ void QGraphicsItemPrivate::setVisibleHelper(bool newVisible, bool explicitly, bo
if (visible == quint32(newVisible))
return;
- QGraphicsItem *parent(q_ptr->parentItem());
- if (parent && newVisible && !parent->d_ptr->visible) {
+ // Don't show child if parent is not visible
+ if (parent && newVisible && !parent->d_ptr->visible)
return;
- }
// Modify the property.
const QVariant newVisibleVariant(q_ptr->itemChange(QGraphicsItem::ItemVisibleChange,