You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2019/10/05 18:36:41 UTC
[royale-asjs] branch develop updated: Update issue#486 (part2)
prevent currentStateChange event to be fired if set same state as current
(#493)
This is an automated email from the ASF dual-hosted git repository.
harbs 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 9546534 Update issue#486 (part2) prevent currentStateChange event to be fired if set same state as current (#493)
9546534 is described below
commit 9546534ad02defa608b63f9eaa03ff7ba28373c3
Author: Cristallium <co...@cristallium.com>
AuthorDate: Sat Oct 5 20:36:37 2019 +0200
Update issue#486 (part2) prevent currentStateChange event to be fired if set same state as current (#493)
* Update Container.as
Don't dispatch "currentStateChange" event if set state is the same as _currentState (see issue #486)
* Update MXMLBeadView.as
Don't dispatch "currentStateChange" event if set state is the same as _currentState (see issue #486)
* Update View.as
Don't dispatch "currentStateChange" event if set state is the same as _currentState (see issue #486)
* Update UIComponent.as
Don't dispatch "currentStateChange" event if set state is the same as _currentState (see issue #486)
---
.../Basic/src/main/royale/org/apache/royale/html/MXMLBeadView.as | 1 +
.../CreateJS/src/main/royale/org/apache/royale/createjs/Container.as | 1 +
.../CreateJS/src/main/royale/org/apache/royale/createjs/core/View.as | 1 +
frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as | 1 +
4 files changed, 4 insertions(+)
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/MXMLBeadView.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/MXMLBeadView.as
index ba2e364..8be04f3 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/MXMLBeadView.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/MXMLBeadView.as
@@ -217,6 +217,7 @@ package org.apache.royale.html
*/
public function set currentState(value:String):void
{
+ if (value == _currentState) return;
var event:ValueChangeEvent = new ValueChangeEvent("currentStateChange", false, false, _currentState, value)
_currentState = value;
dispatchEvent(event);
diff --git a/frameworks/projects/CreateJS/src/main/royale/org/apache/royale/createjs/Container.as b/frameworks/projects/CreateJS/src/main/royale/org/apache/royale/createjs/Container.as
index 6247bf2..149301a 100644
--- a/frameworks/projects/CreateJS/src/main/royale/org/apache/royale/createjs/Container.as
+++ b/frameworks/projects/CreateJS/src/main/royale/org/apache/royale/createjs/Container.as
@@ -272,6 +272,7 @@ package org.apache.royale.createjs
*/
public function set currentState(value:String):void
{
+ if (value == _currentState) return;
var event:ValueChangeEvent = new ValueChangeEvent("currentStateChange", false, false, _currentState, value)
_currentState = value;
dispatchEvent(event);
diff --git a/frameworks/projects/CreateJS/src/main/royale/org/apache/royale/createjs/core/View.as b/frameworks/projects/CreateJS/src/main/royale/org/apache/royale/createjs/core/View.as
index b83261a..84acfbd 100644
--- a/frameworks/projects/CreateJS/src/main/royale/org/apache/royale/createjs/core/View.as
+++ b/frameworks/projects/CreateJS/src/main/royale/org/apache/royale/createjs/core/View.as
@@ -301,6 +301,7 @@ package org.apache.royale.createjs.core
*/
public function set currentState(value:String):void
{
+ if (value == _currentState) return;
var event:ValueChangeEvent = new ValueChangeEvent("currentStateChange", false, false, _currentState, value)
_currentState = value;
dispatchEvent(event);
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
index 7503af4..02f6da1 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -3051,6 +3051,7 @@ COMPILE::JS
*/
public function set currentState(value:String):void
{
+ if (value == _currentState) return;
var event:ValueChangeEvent = new ValueChangeEvent("currentStateChange", false, false, _currentState, value)
_currentState = value;
addEventListener("stateChangeComplete", stateChangeCompleteHandler);