Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5e1e8f27 authored by chaviw's avatar chaviw
Browse files

Only attach descendants if parent was detached

If a layer is reparented, we also attach the children. We traverse down
the heirarchy and attach all descendants. However, we really only want
to attach descendants if they were initially detached because the layer
that's getting reparented detached them.

For example, Child called detachChildren and its Grandchild was
detached. Parent calls reparent. We want to attach Child if it was
detached and then proceed down its children. If Child wasn't detached,
we don't want to attach Grandchild since the layer that detached it
hasn't been reparented.

As cleanup, also moved DetachChildren test to their own file

Test: DetachChildren.ReparentParentLayerOfDetachedChildren
Change-Id: I53b6d9cb165b810e9c55da8a9ba86c7b53a13c0e
parent c6a2f3a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment