Expand all tree internally, after the status is changed from "cannot collapse" to "can collapse"

This commit is contained in:
SHIMODA Hiroshi 2012-02-28 21:51:19 +09:00
parent 29d033d476
commit 018cee82b7

View File

@ -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);