unity fastRestoreTreeStructure to onWindowStateRestored

This commit is contained in:
SHIMODA Hiroshi 2011-12-12 18:39:46 +09:00
parent 67ff3b111f
commit b8fd343863

View File

@ -2277,12 +2277,9 @@ TreeStyleTabBrowser.prototype = {
onWindowStateRestored : function TSTBrowser_onWindowStateRestored() onWindowStateRestored : function TSTBrowser_onWindowStateRestored()
{ {
if (this.window.__SS_tabsToRestore && this.window.__SS_tabsToRestore > 1) if (!this.window.__SS_tabsToRestore || this.window.__SS_tabsToRestore <= 1)
this.fastRestoreTreeStructure(); return;
},
fastRestoreTreeStructure : function TSTBrowser_fastRestoreTreeStructure()
{
var level = this.getTreePref('fastRestoreTree.level'); var level = this.getTreePref('fastRestoreTree.level');
if (level <= this.kFAST_RESTORE_NONE) if (level <= this.kFAST_RESTORE_NONE)
return; return;
@ -2592,8 +2589,7 @@ TreeStyleTabBrowser.prototype = {
this.updateInvertedTabContentsOrder(tabs); this.updateInvertedTabContentsOrder(tabs);
/** /**
* gBrowser.adthis._changeTabbarPosition(position); * gBrowser.addTab() resets gBrowser._lastRelatedTab.owner
dTab() resets gBrowser._lastRelatedTab.owner
* when a new background tab is opened from the current tab, * when a new background tab is opened from the current tab,
* but it will fail with TST because gBrowser.moveTab() (called * but it will fail with TST because gBrowser.moveTab() (called
* by TST) clears gBrowser._lastRelatedTab. * by TST) clears gBrowser._lastRelatedTab.