Needless dummy "group" tab isn't closed if it is a to-be-restored tab

This commit is contained in:
Piro / SHIMODA Hiroshi 2011-07-30 02:52:28 +09:00
parent fd6cac3f6a
commit 0494e7a229

View File

@ -2773,22 +2773,24 @@ TreeStyleTabBrowser.prototype = {
var parent = this.getParentTab(aTab); var parent = this.getParentTab(aTab);
this.window.setTimeout(function(aSelf) { var siblings = parent && parent.parentNode ? this.getChildTabs(parent) : this.visibleRootTabs ;
var siblings = parent && parent.parentNode ? aSelf.getChildTabs(parent) : aSelf.visibleRootTabs ; siblings = siblings.filter(function(aSiblingTab) {
siblings = siblings.filter(function(aSiblingTab) { return aSiblingTab != aTab;
return aSiblingTab != aTab; });
}); var groupTabs = siblings.filter(function(aSiblingTab) {
var groupTabs = siblings.filter(function(aSiblingTab) { return this.isGroupTab(aSiblingTab);
return aSelf.isGroupTab(aSiblingTab); }, this);
});
if ( var groupTab = (
groupTabs.length == 1 && groupTabs.length == 1 &&
siblings.length == 1 && siblings.length == 1 &&
aSelf.hasChildTabs(groupTabs[0]) this.hasChildTabs(groupTabs[0])
) ) ? groupTabs[0] : null ;
aSelf.getTabBrowserFromChild(groupTabs[0]).removeTab(groupTabs[0], { animate : true });
}, 0, this); if (groupTab)
this.window.setTimeout(function(aSelf, aGroupTab) {
aSelf.getTabBrowserFromChild(aGroupTab).removeTab(aGroupTab, { animate : true });
}, 0, this, groupTab);
}, },
getNextFocusedTab : function TSTBrowser_getNextFocusedTab(aTab) getNextFocusedTab : function TSTBrowser_getNextFocusedTab(aTab)
{ {