Always invalidate items tree after sort

This commit is contained in:
Dan Stillman 2017-03-26 05:20:10 -04:00
parent bc4afb6d85
commit d357382dd1

View File

@ -463,7 +463,6 @@ Zotero.ItemTreeView.prototype.notify = Zotero.Promise.coroutine(function* (actio
// TODO: Only refresh on condition change (not currently available in extraData) // TODO: Only refresh on condition change (not currently available in extraData)
yield this.refresh(); yield this.refresh();
this.sort(); this.sort();
this._treebox.invalidate();
return; return;
} }
@ -945,7 +944,6 @@ Zotero.ItemTreeView.prototype.notify = Zotero.Promise.coroutine(function* (actio
} }
this._rememberScrollPosition(scrollPosition); this._rememberScrollPosition(scrollPosition);
this._treebox.invalidate();
} }
// For special case in which an item needs to be selected without changes // For special case in which an item needs to be selected without changes
// necessarily having been made // necessarily having been made
@ -1629,7 +1627,6 @@ Zotero.ItemTreeView.prototype.sort = function (itemID) {
if (i == len-1) { if (i == len-1) {
let rowItem = this._rows.splice(row, 1); let rowItem = this._rows.splice(row, 1);
this._rows.splice(i, 0, rowItem[0]); this._rows.splice(i, 0, rowItem[0]);
this._treebox.invalidate();
} }
} }
} }
@ -1653,6 +1650,7 @@ Zotero.ItemTreeView.prototype.sort = function (itemID) {
} }
Zotero.debug("Sorted items list in " + (new Date - t) + " ms"); Zotero.debug("Sorted items list in " + (new Date - t) + " ms");
this._treebox.invalidate();
}; };