Call setReorderTabsOnHide() when Groups.add() is called

This commit is contained in:
Raymond Lee 2010-07-27 09:30:56 +08:00
parent 7567c47a98
commit 15aec25111
2 changed files with 11 additions and 9 deletions

View File

@ -703,8 +703,8 @@ window.Group.prototype = Utils.extend(new Item(), new Subscribable(), {
if (!options.dontArrange) {
this.arrange();
UI.setReorderTabsOnHide(this);
}
UI.setReorderTabsOnHide(this);
if ( this._nextNewTabCallback ){
this._nextNewTabCallback.apply(this, [item])

View File

@ -108,7 +108,7 @@ var UIManager = {
var self = this;
this._currentTab = gBrowser.selectedTab;
// ___ Dev Menu
if (this._devMode)
this._addDevMenu();
@ -446,14 +446,16 @@ var UIManager = {
});
Tabs.onMove(function() {
if (!self._isTabCandyVisible()) {
var activeGroup = Groups.getActiveGroup();
if (activeGroup) {
var index = self._reorderTabItemsOnShow.indexOf(activeGroup);
if (index == -1)
self._reorderTabItemsOnShow.push(activeGroup);
Utils.timeout(function() { // Marshal event from chrome thread to DOM thread
if (!self._isTabCandyVisible()) {
var activeGroup = Groups.getActiveGroup();
if (activeGroup) {
var index = self._reorderTabItemsOnShow.indexOf(activeGroup);
if (index == -1)
self._reorderTabItemsOnShow.push(activeGroup);
}
}
}
}, 1);
});
Tabs.onFocus(function() {