You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by yi...@apache.org on 2016/08/28 11:39:59 UTC

git commit: [flex-asjs] [refs/heads/refactor-sprite] - Make sure elements removed from XMLList are also removed from original xml.

Repository: flex-asjs
Updated Branches:
  refs/heads/refactor-sprite 20813be62 -> 18de8dc07


Make sure elements removed from XMLList are also removed from original xml.


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

Branch: refs/heads/refactor-sprite
Commit: 18de8dc07a25bacb39db53e029c25f42b57dfd61
Parents: 20813be
Author: yishayw <yi...@hotmail.com>
Authored: Sun Aug 28 14:39:46 2016 +0300
Committer: yishayw <yi...@hotmail.com>
Committed: Sun Aug 28 14:39:46 2016 +0300

----------------------------------------------------------------------
 frameworks/projects/XML/src/main/flex/XMLList.as | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/18de8dc0/frameworks/projects/XML/src/main/flex/XMLList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/XML/src/main/flex/XMLList.as b/frameworks/projects/XML/src/main/flex/XMLList.as
index 7eaf50c..2fed270 100644
--- a/frameworks/projects/XML/src/main/flex/XMLList.as
+++ b/frameworks/projects/XML/src/main/flex/XMLList.as
@@ -627,6 +627,7 @@ package
 				{
 					if(_xmlArray[i] == child)
 					{
+						child.setParent(null);
 						_xmlArray.splice(i,1);
 					}
 				}
@@ -636,7 +637,10 @@ package
 		public function removeChildAt(idx:int):void
 		{
 			if(idx >= 0 && idx < _xmlArray.length)
+			{
+				_xmlArray[idx].setParent(null);
 				_xmlArray.splice(idx,1);
+			}
 		}
 		private function replaceChildAt(idx:int,child:*):void
 		{