This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new abb16ce handle more complex nested states. We probably will not
handle in SimpleStatesImpl, a NestedStatesImpl would be more PAYG. With
royale-compiler 51f04bc6739aed22a0f40c3a736e45114341bc03, fixes #737
abb16ce is described below
commit abb16cee4b5a141b42d0ecd82676a800517b534a
Author: Alex Harui <[email protected]>
AuthorDate: Fri Feb 28 17:37:09 2020 -0800
handle more complex nested states. We probably will not handle in
SimpleStatesImpl, a NestedStatesImpl would be more PAYG. With royale-compiler
51f04bc6739aed22a0f40c3a736e45114341bc03, fixes #737
---
.../org/apache/royale/core/StatesWithTransitionsImpl.as | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git
a/frameworks/projects/Effects/src/main/royale/org/apache/royale/core/StatesWithTransitionsImpl.as
b/frameworks/projects/Effects/src/main/royale/org/apache/royale/core/StatesWithTransitionsImpl.as
index 519f486..041ff67 100644
---
a/frameworks/projects/Effects/src/main/royale/org/apache/royale/core/StatesWithTransitionsImpl.as
+++
b/frameworks/projects/Effects/src/main/royale/org/apache/royale/core/StatesWithTransitionsImpl.as
@@ -313,11 +313,21 @@ package org.apache.royale.core
var childrenAdded:Boolean = false;
for each (var item:IChild in ai.items)
{
- if (!isItemInState(item, oldState))
+ // if item.parent == null then
the item wasn't parented in the
+ // old state possibly because
its parent was excluded in the old statte
+ // see GH issue #737
+ if (!isItemInState(item, oldState) || item.parent ==
null)
{
var parent:IParent = ai.document as IParent;
if (ai.destination != null)
+ {
parent = parent[ai.destination] as IParent;
+ //
SimpleStatesImpl assumes the parent exists (no complex nested states)
+ // but we will
check here
+ if (parent ==
null) continue;
+ // if no
parent, might might be excluded in current state.
+ // we might
later find that the parent hasn't been added yet, not sure.
+ }
if (ai.relativeTo != null)
{
var child:IChild = ai.document[ai.relativeTo]
as IChild;