You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2020/03/28 11:43:29 UTC
[royale-asjs] branch develop updated: Set labels should not be
nullified by missing data
This is an automated email from the ASF dual-hosted git repository.
yishayw 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 0396b38 Set labels should not be nullified by missing data
0396b38 is described below
commit 0396b380201d44312e528e91e0a8fba54668b465
Author: DESKTOP-RH4S838\Yishay <yi...@hotmail.com>
AuthorDate: Sat Mar 28 14:31:17 2020 +0300
Set labels should not be nullified by missing data
---
frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as
index 69121a0..4f5b74e 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Button.as
@@ -340,6 +340,7 @@ public class Button extends UIComponent implements IDataRenderer, IListItemRende
// label
//----------------------------------
+ private var labelSet:Boolean;
public function get label():String
{
return ITextModel(model).text;
@@ -350,6 +351,7 @@ public class Button extends UIComponent implements IDataRenderer, IListItemRende
*/
public function set label(value:String):void
{
+ labelSet = true;
ITextModel(model).text = value;
COMPILE::JS {
setInnerHTML();
@@ -473,10 +475,10 @@ public class Button extends UIComponent implements IDataRenderer, IListItemRende
selected = newSelected as Boolean;
//selectedSet = false;
}
- if (newLabel !== undefined/* && !labelSet*/)
+ if (newLabel !== undefined && !labelSet)
{
label = newLabel;
- //labelSet = false;
+ labelSet = false;
}
dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));