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 8b0631b145bdce4c538daceb95530be349a08f29
Author: Alex Harui <aha...@apache.org>
AuthorDate: Thu Jan 10 21:33:55 2019 -0800

    don't cache bogus values
---
 frameworks/projects/MXRoyale/src/main/royale/mx/containers/Form.as | 2 +-
 frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as  | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Form.as 
b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Form.as
index 56789d6..babeca7 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Form.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/Form.as
@@ -529,7 +529,7 @@ public class Form extends Container
             }
         }
 
-               if (labelWidthSet)
+               if (labelWidthSet && labelWidth > 0)
                measuredLabelWidth = labelWidth;
 
         return labelWidth;
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as 
b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
index 2b8b571..6606c86 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Container.as
@@ -991,6 +991,8 @@ public class Container extends UIComponent
                o.top = vm.top + pd.top;
                o.bottom = vm.bottom + pd.bottom;
                
+        if (isNaN(o.left) || isNaN(o.top))
+            _viewMetricsAndPadding = null; // don't cache invalid entry
                return o;
        }
        

Reply via email to