flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject git commit: [flex-sdk] [refs/heads/develop] - fixed issue when moving an item that both sorted and filtered
Date Tue, 21 May 2013 04:33:56 GMT
Updated Branches:
  refs/heads/develop 01321507c -> 9d3cc9af6


fixed issue when moving an item that both sorted and filtered


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/9d3cc9af
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/9d3cc9af
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/9d3cc9af

Branch: refs/heads/develop
Commit: 9d3cc9af6460a75e652e4c75b19a00c1c826e9c5
Parents: 0132150
Author: Justin Mclean <jmclean@apache.org>
Authored: Tue May 21 13:09:27 2013 +1000
Committer: Justin Mclean <jmclean@apache.org>
Committed: Tue May 21 13:09:27 2013 +1000

----------------------------------------------------------------------
 .../src/mx/collections/ListCollectionView.as       |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/9d3cc9af/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/collections/ListCollectionView.as b/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
index b43e0fc..fd57194 100644
--- a/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
+++ b/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
@@ -1479,7 +1479,7 @@ public class ListCollectionView extends Proxy
                 //if there is a property see if it affects the sort
                 updateEntry.move =
                     updateEntry.move
-                    || filterFunction
+                    || filterFunction != null && filterFunction(item)
                     || !updateInfo.property
                     || (sort && sort.propertyAffectsSort(String(updateInfo.property)));
             }
@@ -1665,7 +1665,10 @@ public class ListCollectionView extends Proxy
                 localIndex.splice(removeLocation, 1);
             }
 
-            var addLocation:int = addItemsToView([item], removeLocation, false);
+            var addLocation:int = -1;
+			
+			if (filterFunction == null || filterFunction(item))
+				addLocation = addItemsToView([item], removeLocation, false);
 
             if (dispatch)
             {


Mime
View raw message