r21325: delete children in reverse order since the array is manipulated during the...
authorDerrell Lipman <derrell@samba.org>
Wed, 14 Feb 2007 04:13:46 +0000 (04:13 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:48:11 +0000 (14:48 -0500)
(This used to be commit 4ee68f55da5446ebd44173bd2f67056cd6502e1b)

webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/treevirtual/SimpleTreeDataModel.js

index 875eeea6eccb9356e8d4b0b93bd90bf2e218329c..90e8ef5c8046de29cb8759157e7e8d9d8ddd304f 100644 (file)
@@ -419,7 +419,7 @@ qx.Proto.addLeaf = function(parentNodeId,
 qx.Proto.prune = function(nodeId, bSelfAlso)
 {
   // First, recursively remove all children
-  for (var i = 0; i < this._nodeArr[nodeId].children.length; i++)
+  for (var i = this._nodeArr[nodeId].children.length - 1; i >= 0; i--)
   {
     this.prune(this._nodeArr[nodeId].children[i], true);
   }