flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cframp...@apache.org
Subject svn commit: r1403831 - /incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
Date Tue, 30 Oct 2012 19:27:46 GMT
Author: cframpton
Date: Tue Oct 30 19:27:45 2012
New Revision: 1403831

URL: http://svn.apache.org/viewvc?rev=1403831&view=rev
Log:
In validateSkinChange(), if reloading a skin, detach the error skin if there is one, and reattach
it, after loading the new skin to ensure it stays on top.  [SDK-30461].

Modified:
    incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as

Modified: incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as?rev=1403831&r1=1403830&r2=1403831&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
(original)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
Tue Oct 30 19:27:45 2012
@@ -445,8 +445,13 @@ public class SkinnableComponent extends 
         if (!skipReload)
         {
             if (skin)
-                detachSkin();
-            attachSkin();
+            {
+                detachSkin();                
+                // If there is an error skin remove it since it has to go on top of the new
skin.
+                removeErrorSkin();
+            }
+            attachSkin();            
+            updateErrorSkin();
         }
     }
     
@@ -831,12 +836,20 @@ public class SkinnableComponent extends 
         }
         else
         {
-            if (errorObj)
-                super.removeChild(errorObj);
-            
+            removeErrorSkin();
+        }
+    }
+    
+    private function removeErrorSkin():void
+    {
+        if (errorObj)
+        {
+            super.removeChild(errorObj);
             errorObj = null;
         }
+
     }
+
     //--------------------------------------------------------------------------
     //
     //  Methods - Parts



Mime
View raw message