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
commit 259f0d51526e9ddf0edabb85b4f8788a2a6476ee Author: Alex Harui <[email protected]> AuthorDate: Sun Nov 22 23:36:22 2020 -0800 delay state setting until skin is set --- .../royale/spark/components/supportClasses/SkinnableComponent.as | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/SkinnableComponent.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/SkinnableComponent.as index 4122bcb..8de275a 100644 --- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/SkinnableComponent.as +++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/supportClasses/SkinnableComponent.as @@ -231,6 +231,7 @@ public class SkinnableComponent extends UIComponent } + private var skinStateInvalidated:Boolean = false; /** * Marks the component so that the new state of the skin is set @@ -243,9 +244,12 @@ public class SkinnableComponent extends UIComponent */ public function invalidateSkinState():void { + skinStateInvalidated = true; + if (skin) { skin.currentState = getCurrentSkinState(); + skinStateInvalidated = false; } } @@ -288,6 +292,8 @@ public class SkinnableComponent extends UIComponent _skin = value; findSkinParts(); + if (skinStateInvalidated) + invalidateSkinState(); dispatchEvent(new Event("skinChanged")); }
