From 72ae666e123c45e788653188e71c29b8da71e294 Mon Sep 17 00:00:00 2001 From: Piro / YUKI Hiroshi Date: Thu, 2 Oct 2014 02:10:10 +0900 Subject: [PATCH] Restore ancestor relation of tabs even if it is restored by "undo close tab" --- modules/browser.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/browser.js b/modules/browser.js index b6f1bafc..6c16b8c4 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -3759,7 +3759,8 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, { this.setTabValue(aTab, this.kID, id); this.tabsHash[id] = aTab; - if (structureRestored) { + if (structureRestored && + !aTab.__treestyletab__restoredByUndoCloseTab) { this._fixMissingAttributesFromSessionData(aTab); } else { @@ -3771,7 +3772,9 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, { dontUpdateIndent : true, dontAnimate : restoringMultipleTabs }; - let childTabs = this._restoreChildTabsRelation(aTab, children, mayBeDuplicated, options); + let childTabs = structureRestored ? + [] : + this._restoreChildTabsRelation(aTab, children, mayBeDuplicated, options); this._restoreTabPositionAndIndent(aTab, childTabs, mayBeDuplicated);