You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2013/05/13 01:12:27 UTC

git commit: [flex-sdk] [refs/heads/develop] - FLEX-25071 Only need to loop through all times if array collection is filtered not sorted.

Updated Branches:
  refs/heads/develop 49239e24a -> aeb877eeb


FLEX-25071 Only need to loop through all times if array collection is filtered not sorted.


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

Branch: refs/heads/develop
Commit: aeb877eeb266e5dc3600d270abb70bdfce303c0d
Parents: 49239e2
Author: Justin Mclean <jm...@apache.org>
Authored: Mon May 13 09:12:11 2013 +1000
Committer: Justin Mclean <jm...@apache.org>
Committed: Mon May 13 09:12:11 2013 +1000

----------------------------------------------------------------------
 .../src/mx/collections/ListCollectionView.as       |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/aeb877ee/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 7496ab4..060e006 100644
--- a/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
+++ b/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
@@ -831,8 +831,9 @@ public class ListCollectionView extends Proxy
         var len:int = length;
         if (len > 0)
         {
-            if (localIndex)
+            if (localIndex && filterFunction != null)
             {
+				len = localIndex.length;
                 for (var i:int = len - 1; i >= 0; i--)
                 {
                     removeItemAt(i);
@@ -840,6 +841,7 @@ public class ListCollectionView extends Proxy
             }
             else
             {
+				localIndex = null;
                 list.removeAll();
             }
         }