You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2019/03/12 18:07:41 UTC

[royale-asjs] branch develop updated: jewel-togglebutton: selectedText defaults to text when is not set (equals to null)

This is an automated email from the ASF dual-hosted git repository.

carlosrovira 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 949a38e  jewel-togglebutton: selectedText defaults to text when is not set (equals to null)
949a38e is described below

commit 949a38ecc7751687eb81ab1fcdce842afdb0b7cf
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Tue Mar 12 19:07:34 2019 +0100

    jewel-togglebutton: selectedText defaults to text when is not set (equals to null)
---
 .../Jewel/src/main/royale/org/apache/royale/jewel/ToggleButton.as   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ToggleButton.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ToggleButton.as
index eb2f6d5..5f990dd 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ToggleButton.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/ToggleButton.as
@@ -133,7 +133,7 @@ package org.apache.royale.jewel
             }
         }
 
-        private var _selectedText:String = "";
+        private var _selectedText:String = null;
         /**
          *  The selectedText of the icon
          *  
@@ -144,6 +144,10 @@ package org.apache.royale.jewel
          */
 		public function get selectedText():String
 		{
+            if(_selectedText == null)
+            {
+                return text;
+            }
             return _selectedText;            
 		}
         public function set selectedText(value:String):void