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 2019/11/06 18:38:10 UTC

[royale-asjs] branch develop updated: Fix mx tree close nore issue.

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 3cd442d  Fix mx tree close nore issue.
3cd442d is described below

commit 3cd442d2a2d2e74d777754c8e544fcef585778e2
Author: DESKTOP-RH4S838\Yishay <yi...@hotmail.com>
AuthorDate: Wed Nov 6 20:36:46 2019 +0200

    Fix mx tree close nore issue.
    
    Effective index is increased when items are removed.
---
 .../royale/mx/controls/treeClasses/HierarchicalCollectionView.as     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/treeClasses/HierarchicalCollectionView.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/treeClasses/HierarchicalCollectionView.as
index b1aaa91..455750b 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/treeClasses/HierarchicalCollectionView.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/treeClasses/HierarchicalCollectionView.as
@@ -1143,10 +1143,13 @@ public class HierarchicalCollectionView extends EventDispatcher
             var item:Object = cursor.current;
             var collectionEvent:org.apache.royale.events.CollectionEvent = new org.apache.royale.events.CollectionEvent(type);
             collectionEvent.item = item;
-            collectionEvent.index = index++;
+            collectionEvent.index = index;
             dispatchEvent(collectionEvent);
             if (adding)
+			{
                 currentLength++;
+				index++;
+			}
             else
                 currentLength--;
             if (isOpen(item))