You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2020/06/12 07:52:50 UTC

[royale-asjs] branch develop updated: try not tracking selectedIndices if not multipleselection. Should fix #851

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

aharui 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 b676f42  try not tracking selectedIndices if not multipleselection.  Should fix #851
b676f42 is described below

commit b676f42772a6c6aa00fe1eaf33729cac22cf01f5
Author: Alex Harui <ah...@apache.org>
AuthorDate: Fri Jun 12 00:52:32 2020 -0700

    try not tracking selectedIndices if not multipleselection.  Should fix #851
---
 .../main/royale/mx/controls/listClasses/AdvancedListBase.as   | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as
index d4be093..ced0681 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/listClasses/AdvancedListBase.as
@@ -4968,8 +4968,11 @@ public class AdvancedListBase extends ListBase /* extends UIComponent
 
                 //Clear all other selections, this is a single click
                 clearSelected(transition);
-                addSelectionData(uid, new ListBaseSelectionData(/*item.*/data, index, approximate));
-                drawItem(index, true, uid == highlightUID, true, transition);
+				if (allowMultipleSelection)
+				{
+	                addSelectionData(uid, new ListBaseSelectionData(/*item.*/data, index, approximate));
+    	            drawItem(index, true, uid == highlightUID, true, transition);
+				}
                 (model as ISelectionModel).selectedIndex = index; //_selectedIndex = index;
                 //_selectedItem = item.data;
                 iterator.seek(CursorBookmark.CURRENT, (model as ISelectionModel).selectedIndex /*_selectedIndex*/ - 
@@ -9070,8 +9073,8 @@ public class AdvancedListBase extends ListBase /* extends UIComponent
         }
         else
         {*/
-            if (selectItem(item.data, item.index, event.shiftKey, event.ctrlKey))
-                mouseDownItem = item;
+        if (selectItem(item.data, item.index, event.shiftKey, event.ctrlKey))
+            mouseDownItem = item;
         /*}*/
     }