fix regression: tree structure is correctly restored after set of tabs are restored.

This commit is contained in:
Piro / SHIMODA Hiroshi 2010-11-11 01:49:18 +09:00
parent 9fedf72bdc
commit 4a6774e0b7

View File

@ -2148,6 +2148,9 @@ TreeStyleTabBrowser.prototype = {
if (collapsed) if (collapsed)
this.stopRendering(); this.stopRendering();
var backupAttributes = {};
backupAttributes[this.kCHILDREN] = this.getTabValue(tab, this.kCHILDREN);
var subtreeCollapsed = this.isSubtreeCollapsed(tab); var subtreeCollapsed = this.isSubtreeCollapsed(tab);
if ( if (
closeParentBehavior == this.CHILDREN_CLOSE || closeParentBehavior == this.CHILDREN_CLOSE ||
@ -2202,11 +2205,9 @@ TreeStyleTabBrowser.prototype = {
this.deleteTabValue(next, this.kINSERT_AFTER); this.deleteTabValue(next, this.kINSERT_AFTER);
} }
var backupAttributes = {};
var indentModifiedTabs = []; var indentModifiedTabs = [];
if (firstChild) { if (firstChild) {
backupAttributes[this.kCHILDREN] = this.getTabValue(tab, this.kCHILDREN);
let children = this.getChildTabs(tab); let children = this.getChildTabs(tab);
let behavior = parentTab ? closeParentBehavior : closeRootBehavior ; let behavior = parentTab ? closeParentBehavior : closeRootBehavior ;
if (behavior == this.CHILDREN_PROMOTE_FIRST && if (behavior == this.CHILDREN_PROMOTE_FIRST &&