forked from qt-creator/qt-creator
Utils: Fix visibility handling for aspects
Otherwise we may fail to hide widgets of aspects that are explicitly set invisible while construction. Change-Id: I2679c8fa22e79e4eb32ca5ae4266010d8cf9387d Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -209,7 +209,7 @@ void BaseAspect::setVisible(bool visible)
|
|||||||
// This may happen during layout building. Explicit setting visibility here
|
// This may happen during layout building. Explicit setting visibility here
|
||||||
// may create a show a toplevel widget for a moment until it is parented
|
// may create a show a toplevel widget for a moment until it is parented
|
||||||
// to some non-shown widget.
|
// to some non-shown widget.
|
||||||
if (w->parentWidget())
|
if (!visible || w->parentWidget())
|
||||||
w->setVisible(visible);
|
w->setVisible(visible);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user