overview: Explicitly reset parent on teradown

Instantiators create objects when they're added to a model, and
deference when when they're removed from the model.

When we explicitly set a parent in onObjectAdded we're creating a second
reference. This does get cleaned up later, but not in the same frame.

This brings us in line to what QQmlRepeater (which works with items)
does internally for items being added and removed.

BUG: 478777
This commit is contained in:
David Edmundson 2024-02-13 17:12:42 +00:00
parent b480297913
commit eab90b6a0a

View file

@ -136,6 +136,12 @@ FocusScope {
windowHeap: heap
}
onObjectRemoved: (index, object) => {
// undo explicitly set parent in objectAdded so it can be
// removed from the scene immediately
object.parent = null
}
onObjectAdded: (index, object) => {
object.parent = expoLayout
var key = object.window.internalId;