path: root/src
diff options
authorMitch Curtis <mitch.curtis@qt.io>2018-05-28 17:17:07 +0200
committerJan Arve Sæther <jan-arve.saether@qt.io>2018-07-09 14:31:48 +0000
commit085d13f6ae3009bd157bfce6a062453d95298cbc (patch)
tree645209dd8d90b0bf80f90ed6b72eac73826c7c1c /src
parent75ccd3f28d4aaebdd378bd75d76a730240d58a50 (diff)
Fix items in layouts not being rendered when layers are used
A layer effect is apparently considered a child item of the layout that manages the item, and this causes issues when layouting. As was done for positioners in 865b4ec8, exclude any items for which QQuickItemPrivate::isTransparentForPositioner() returns true from layouting. As that commit made QQuickItemLayer set it to true when the layer is enabled, QQuickShaderEffectSource will be excluded from layouting. Task-number: QTBUG-63269 Change-Id: I463ff8d0cea0dfd6c4273f376de347971040d3d0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src')
1 files changed, 3 insertions, 0 deletions
diff --git a/src/imports/layouts/qquicklayout.cpp b/src/imports/layouts/qquicklayout.cpp
index b3a5a2cfc8..cc206bcb95 100644
--- a/src/imports/layouts/qquicklayout.cpp
+++ b/src/imports/layouts/qquicklayout.cpp
@@ -764,6 +764,9 @@ bool QQuickLayout::shouldIgnoreItem(QQuickItem *child, QQuickLayoutAttached *&in
ignoreItem = effectiveMaxSize.isNull();
+ if (!ignoreItem && childPrivate->isTransparentForPositioner())
+ ignoreItem = true;
if (ignoreItem)
d->m_ignoredItems << child;
return ignoreItem;