royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject [royale-asjs] branch develop updated: avoid List throw change event when user define selectedIndex
Date Sun, 16 Sep 2018 21:26:47 GMT
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 a7097e2  avoid List throw change event when user define selectedIndex
a7097e2 is described below

commit a7097e2c5053393fd6ccfb0abb52b1be0daac086
Author: Carlos Rovira <carlosrovira@apache.org>
AuthorDate: Sun Sep 16 23:26:40 2018 +0200

    avoid List throw change event when user define selectedIndex
---
 .../src/main/royale/org/apache/royale/jewel/beads/views/ListView.as  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ListView.as
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ListView.as
index b971fb7..e9e802b 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ListView.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/ListView.as
@@ -124,7 +124,10 @@ package org.apache.royale.jewel.beads.views
 
 			lastSelectedIndex = listModel.selectedIndex;
 
-			IEventDispatcher(_strand).dispatchEvent(new Event(Event.CHANGE));
+			// avoid throw change event as part of select proper item at initialization time
+			if(event != null) {
+				IEventDispatcher(_strand).dispatchEvent(new Event(Event.CHANGE));
+			}
 		}
 
 		protected var lastRollOverIndex:int = -1;


Mime
View raw message