From 018cee82b79298501f8178e415338d0cbb3c76dc Mon Sep 17 00:00:00 2001 From: SHIMODA Hiroshi Date: Tue, 28 Feb 2012 21:51:19 +0900 Subject: [PATCH] Expand all tree internally, after the status is changed from "cannot collapse" to "can collapse" --- modules/browser.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/browser.js b/modules/browser.js index ff5c5f6d..e9cd1f31 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -1532,10 +1532,14 @@ TreeStyleTabBrowser.prototype = { }).error(this.defaultDeferredErrorHandler); var allowToCollapse = this.getTreePref('allowSubtreeCollapseExpand.'+orient); - if (this.allowSubtreeCollapseExpand && !allowToCollapse) + var canCollapseStateChanged = this.allowSubtreeCollapseExpand != allowToCollapse; + + if (!allowToCollapse && canCollapseStateChanged) + this.collapseExpandAllSubtree(false, false); + this.allowSubtreeCollapseExpand = allowToCollapse; + if (allowToCollapse && canCollapseStateChanged) this.collapseExpandAllSubtree(false, false); - this.allowSubtreeCollapseExpand = allowToCollapse; this.maxTreeLevel = this.getTreePref('maxTreeLevel.'+orient); this.setTabbrowserAttribute(this.kALLOW_STACK, this.canStackTabs ? 'true' : null);