From 15218050075311bc71facb93204d7c3f74b46f98 Mon Sep 17 00:00:00 2001 From: "rginda%netscape.com" Date: Wed, 5 Sep 2001 01:30:59 +0000 Subject: [PATCH] - venkman only - reset childIndex and parentRecord on a removed tree item --- extensions/venkman/resources/content/outliner-utils.js | 2 ++ extensions/venkman/resources/content/tree-utils.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/extensions/venkman/resources/content/outliner-utils.js b/extensions/venkman/resources/content/outliner-utils.js index 842d374723da..5aedc0a88bf3 100644 --- a/extensions/venkman/resources/content/outliner-utils.js +++ b/extensions/venkman/resources/content/outliner-utils.js @@ -536,6 +536,8 @@ function tovr_remchild (index) var fpDelta = -this.childData[index].visualFootprint; var changeStart = this.childData[index].calculateVisualRow(); + this.childData[index].childIndex = -1; + delete this.childData[index].parentRecord; arrayRemoveAt (this.childData, index); this.invalidateCache(); this.onVisualFootprintChanged (changeStart, fpDelta); diff --git a/extensions/venkman/resources/content/tree-utils.js b/extensions/venkman/resources/content/tree-utils.js index 842d374723da..5aedc0a88bf3 100644 --- a/extensions/venkman/resources/content/tree-utils.js +++ b/extensions/venkman/resources/content/tree-utils.js @@ -536,6 +536,8 @@ function tovr_remchild (index) var fpDelta = -this.childData[index].visualFootprint; var changeStart = this.childData[index].calculateVisualRow(); + this.childData[index].childIndex = -1; + delete this.childData[index].parentRecord; arrayRemoveAt (this.childData, index); this.invalidateCache(); this.onVisualFootprintChanged (changeStart, fpDelta);