www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit c407675d6a1fe5d53cae55c132c20f6d6275f709
parent 037bc07a3c80e7452d517e78e7998071922925ee
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu, 11 Jun 2015 16:06:00 -0400

Fix more Travis timeouts, hopefully

Diffstat:
Mchrome/content/zotero/xpcom/collectionTreeView.js | 9++++++---
Mchrome/content/zotero/xpcom/itemTreeView.js | 5++---
2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -114,6 +114,7 @@ Zotero.CollectionTreeView.prototype.setTree = Zotero.Promise.coroutine(function* if (!selected) { this.selection.select(0); } + this.selection.selectEventsSuppressed = false; yield this._runListeners('load'); this._initialized = true; @@ -129,9 +130,10 @@ Zotero.CollectionTreeView.prototype.setTree = Zotero.Promise.coroutine(function* }); -/* - * Reload the rows from the data access methods - * (doesn't call the tree.invalidate methods, etc.) +/** + * Rebuild the tree from the data access methods and clear the selection + * + * Calling code must invalidate the tree, restore the selection, and unsuppress selection events */ Zotero.CollectionTreeView.prototype.refresh = Zotero.Promise.coroutine(function* () { @@ -225,6 +227,7 @@ Zotero.CollectionTreeView.prototype.refresh = Zotero.Promise.coroutine(function* } } + this.selection.selectEventsSuppressed = true; this.selection.clearSelection(); this._rows = newRows; this.rowCount = this._rows.length; diff --git a/chrome/content/zotero/xpcom/itemTreeView.js b/chrome/content/zotero/xpcom/itemTreeView.js @@ -68,8 +68,7 @@ Zotero.ItemTreeView.prototype.type = 'item'; /** * Called by the tree itself */ -Zotero.ItemTreeView.prototype.setTree = Zotero.serial(Zotero.Promise.coroutine(function* (treebox) -{ +Zotero.ItemTreeView.prototype.setTree = Zotero.Promise.coroutine(function* (treebox) { try { Zotero.debug("Setting tree for " + this.collectionTreeRow.id + " items view " + this.id); var start = Date.now(); @@ -272,7 +271,7 @@ Zotero.ItemTreeView.prototype.setTree = Zotero.serial(Zotero.Promise.coroutine(f } throw e; } -})); +}); /**