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:
parent
b480297913
commit
eab90b6a0a
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue