flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [3/7] git commit: [flex-sdk] [refs/heads/release4.12.0] - FLEX-34101 spark list doesn't refresh with filterFunction + fix RTE that occurs when adding more than one item to a filtered list.
Date Mon, 24 Feb 2014 07:08:26 GMT
FLEX-34101 spark list doesn't refresh with filterFunction + fix RTE that occurs when adding
more than one item to a filtered list.


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

Branch: refs/heads/release4.12.0
Commit: 95d1e3586977c31b41368cf4517065922393c0b5
Parents: 4cec69c
Author: Justin Mclean <jmclean@apache.org>
Authored: Mon Feb 24 12:17:05 2014 +1100
Committer: Justin Mclean <jmclean@apache.org>
Committed: Mon Feb 24 12:17:05 2014 +1100

----------------------------------------------------------------------
 .../src/mx/collections/ListCollectionView.as      | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/95d1e358/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 95972fb..3610d28 100644
--- a/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
+++ b/frameworks/projects/framework/src/mx/collections/ListCollectionView.as
@@ -652,10 +652,8 @@ public class ListCollectionView extends Proxy
      *  @productversion Flex 3
      */
     public function addAllAt(addList:IList, index:int):void
-    {
-		var maxLength:int = this.length
-			
-        if (index < 0 || index > maxLength)
+    {	
+        if (index < 0 || index > this.length)
         {
             var message:String = resourceManager.getString(
                 "collections", "outOfBounds", [ index ]);
@@ -663,16 +661,16 @@ public class ListCollectionView extends Proxy
         }
         
         var length:int = addList.length;
-			
-		// incremental index may be out of bounds because of filtering,
-		// so add this item to the end.
-		if (index > maxLength)
-			index = maxLength;
 
         for (var i:int=0; i < length; i++)
         {
             var insertIndex:int = i + index;
 			
+			// incremental index may be out of bounds because of filtering,
+			// so add this item to the end.
+			if (insertIndex > this.length)
+				insertIndex = this.length;
+			
             this.addItemAt(addList.getItemAt(i), insertIndex);
         }
     }
@@ -1210,7 +1208,7 @@ public class ListCollectionView extends Proxy
 			throw new CollectionViewError(message);
 		}
 
-        if (localIndex && addedItems.length > 1)
+        if (localIndex && addedItems.length > 0)
         {
             addLocation = -1;
         }


Mime
View raw message