Skip to content

Commit cfb28a9

Browse files
committed
Call QQuickItemPrivate::transformChanged when the clip is dirtied
An item that observes the viewport may use this to do clipping via QQuickItem::clipRect(), in which case changing the clip of a parent item needs to be reflected by a transformChanged call for the observing item. Change-Id: I02df01a6ff6d48695bcf55a65983966c0575d86b Reviewed-by: Volker Hilsheimer <[email protected]>
1 parent b00798d commit cfb28a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/quick/items/qquickitem.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -5377,7 +5377,7 @@ bool QQuickItemPrivate::transformChanged(QQuickItem *transformedItem)
53775377
}
53785378
// If ItemObservesViewport, clipRect() calculates the intersection with the viewport;
53795379
// so each time the item moves in the viewport, its clipnode needs to be updated.
5380-
if (thisWantsIt && q->clip())
5380+
if (thisWantsIt && q->clip() && !(dirtyAttributes & QQuickItemPrivate::Clip))
53815381
dirty(QQuickItemPrivate::Clip);
53825382
return ret;
53835383
}
@@ -6629,7 +6629,7 @@ void QQuickItemPrivate::dirty(DirtyType type)
66296629
QQuickWindowPrivate::get(window)->dirtyItem(q);
66306630
}
66316631
}
6632-
if (type & (TransformOrigin | Transform | BasicTransform | Position | Size))
6632+
if (type & (TransformOrigin | Transform | BasicTransform | Position | Size | Clip))
66336633
transformChanged(q);
66346634
}
66356635

0 commit comments

Comments
 (0)