From e90225ebdadbb7e2088601fc906ce19d6b592bcc Mon Sep 17 00:00:00 2001 From: "varga%nixcorp.com" Date: Sat, 21 Aug 2004 15:59:11 +0000 Subject: [PATCH] Additional patch for bug 211046. r=varga sr=jag --- .../resources/content/bindings/tree.xml | 42 ++++++++++--------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/xpfe/global/resources/content/bindings/tree.xml b/xpfe/global/resources/content/bindings/tree.xml index 94ab9e291584..23155927041e 100644 --- a/xpfe/global/resources/content/bindings/tree.xml +++ b/xpfe/global/resources/content/bindings/tree.xml @@ -30,7 +30,7 @@ + onset="return this.treeBoxObject.view = val;"/> @@ -56,8 +56,8 @@ onset="this.setAttribute('seltype', val); return val;"/> + onget="return this.view.selection.currentIndex;" + onset="return this.view.selection.currentIndex = val;"/> @@ -74,10 +74,10 @@ onget="return this.boxObject.QueryInterface(Components.interfaces.nsITreeBoxObject);" readonly="true"/> !/Mac/.test(navigator.platform) @@ -214,11 +214,11 @@ No openState param == toggle --> = 0) { this.view.selection.select(parentIndex); this.treeBoxObject.ensureRowIsVisible(parentIndex); @@ -266,7 +266,7 @@ = 0 && !this.changeOpenState(row, true)) { - var view = this.treeBoxObject.view; + var view = this.view; if (row + 1 < view.rowCount && view.getParentIndex(row + 1) == row) { // If already opened, select the first child. @@ -301,8 +301,9 @@ return; } var c = this.currentIndex; - try { if (c+1 == this.treeBoxObject.view.rowCount) - return; + try { + if (c+1 == this.view.rowCount) + return; } catch (e) {} if (!event.ctrlKey) this.view.selection.timedSelect(c+1, this._selectDelay); @@ -328,8 +329,9 @@ if (this.view.selection.single) return; var c = this.currentIndex; - try { if (c+1 == this.treeBoxObject.view.rowCount) - return; + try { + if (c+1 == this.view.rowCount) + return; } catch (e) {} // Extend the selection from the existing pivot, if any this.view.selection.rangedSelect(-1, c + 1, event.ctrlKey); @@ -365,7 +367,7 @@ return; } var c = this.currentIndex; - var l = this.treeBoxObject.view.rowCount - 1; + var l = this.view.rowCount - 1; if (c == l) return; var f = this.treeBoxObject.getFirstVisibleRow(); @@ -408,7 +410,7 @@ if (this.view.selection.single) return; var c = this.currentIndex; - var l = this.treeBoxObject.view.rowCount - 1; + var l = this.view.rowCount - 1; if (c == l) return; var f = this.treeBoxObject.getFirstVisibleRow(); @@ -428,7 +430,7 @@