You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by bi...@apache.org on 2014/08/17 09:48:04 UTC

[17/50] git commit: [flex-sdk] [refs/heads/new_android_skins] - FLEX-34119 Renamed a Boolean for clarity in HierarchicalCollectionViewCursor.collectionChangeHandler.

FLEX-34119
Renamed a Boolean for clarity in HierarchicalCollectionViewCursor.collectionChangeHandler.


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

Branch: refs/heads/new_android_skins
Commit: 0e15df32a70f77916978b3008e62d218ebde56b5
Parents: b8cc55f
Author: Mihai Chira <mi...@gmail.com>
Authored: Tue Jul 22 17:54:16 2014 +0100
Committer: Mihai Chira <mi...@gmail.com>
Committed: Tue Jul 22 17:54:16 2014 +0100

----------------------------------------------------------------------
 .../collections/HierarchicalCollectionViewCursor.as | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/0e15df32/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as b/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as
index af7c2c0..1452676 100644
--- a/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as
+++ b/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as
@@ -1148,7 +1148,7 @@ public class HierarchicalCollectionViewCursor extends EventDispatcher
         var parentStack:Array = getParentStack(current);
         var isBefore:Boolean = false;
         var parentOfChangingNodeIndex:int;
-        var isOurAncestorChanging:Boolean;
+        var selectedAndChangingNodesHaveCommonAncestor:Boolean;
         var bookmarkInChangingCollection:CursorBookmark;
 
         // remember the current parent
@@ -1172,11 +1172,12 @@ public class HierarchicalCollectionViewCursor extends EventDispatcher
                 if (isBefore)
                 {
                     // if the added node is before the current
-                    // and they share parent's then we have to
+                    // and they share parents then we have to
                     // adjust the currentChildIndex or
                     // the stack of child indexes.
                     parentOfChangingNode = collection.getParentItem(changingNode);
                     changingNodeAndSiblings = collection.getChildren(parentOfChangingNode); 
+
                     if (parentOfChangingNode == parentOfCurrentNode)
                     {
                         if (changingNodeAndSiblings != null)
@@ -1195,8 +1196,8 @@ public class HierarchicalCollectionViewCursor extends EventDispatcher
                     }
                     else {
                         parentOfChangingNodeIndex = parentStack.indexOf(parentOfChangingNode);
-                        isOurAncestorChanging = parentOfChangingNodeIndex != -1;
-                        if (isOurAncestorChanging)
+                        selectedAndChangingNodesHaveCommonAncestor = parentOfChangingNodeIndex != -1;
+                        if (selectedAndChangingNodesHaveCommonAncestor)
                         {
                             if (changingNodeAndSiblings != null)
                             {
@@ -1251,11 +1252,12 @@ public class HierarchicalCollectionViewCursor extends EventDispatcher
                 if (isBefore)
                 {
                     // if the removed node is before the current
-                    // and they share parent's then we have to
+                    // and they share parents then we have to
                     // adjust the currentChildIndex or
                     // the stack of child indexes.
                     parentOfChangingNode = collection.getParentItem(changingNode);
                     changingNodeAndSiblings = collection.getChildren(parentOfChangingNode);
+
                     if (parentOfChangingNode == parentOfCurrentNode)
                     {
                         if (changingNodeAndSiblings != null)
@@ -1274,8 +1276,8 @@ public class HierarchicalCollectionViewCursor extends EventDispatcher
                     }
                     else {
                         parentOfChangingNodeIndex = parentStack.indexOf(parentOfChangingNode);
-                        isOurAncestorChanging = parentOfChangingNodeIndex != -1;
-                        if (isOurAncestorChanging)
+                        selectedAndChangingNodesHaveCommonAncestor = parentOfChangingNodeIndex != -1;
+                        if (selectedAndChangingNodesHaveCommonAncestor)
                         {
                             if (changingNodeAndSiblings != null)
                             {