You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2020/04/21 06:22:04 UTC

[royale-asjs] branch develop updated: another fix for #797

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 84c1859  another fix for #797
84c1859 is described below

commit 84c18593a209a43e04a827b7eebb482a4348c0a3
Author: Alex Harui <ah...@apache.org>
AuthorDate: Mon Apr 20 23:21:43 2020 -0700

    another fix for #797
---
 .../MXRoyale/src/main/royale/mx/containers/FormItem.as | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/FormItem.as b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/FormItem.as
index fee2fd0..2b36a11 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/containers/FormItem.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/containers/FormItem.as
@@ -347,13 +347,16 @@ public class FormItem extends Container
         invalidateProperties();
         invalidateSize();
         invalidateDisplayList();
+
+		if (labelObj)
+			labelObj.invalidateSize();
         
         // Changing the label could affect the overall form label width
         // so we need to invalidate our parent's size here too
        if (parent is Form)
        {
-            Form(parent).invalidateLabelWidth();
             commitProperties();
+            Form(parent).invalidateLabelWidth();
 			Form(parent).dispatchEvent(new Event("layoutNeeded"));
        }
 
@@ -641,6 +644,19 @@ public class FormItem extends Container
         else
             measureHorizontal();
     }
+
+	private var inMeasure:Boolean = false;
+	
+	override public function get measuredWidth():Number
+	{
+		if (!inMeasure)
+		{
+			inMeasure = true;
+			measure();
+			inMeasure = false;
+		}
+		return super.measuredWidth;
+	}
     
     /**
      * @private