Fix more Travis timeouts, hopefully

This commit is contained in:
Dan Stillman 2015-06-11 16:06:00 -04:00
parent 037bc07a3c
commit c407675d6a
2 changed files with 8 additions and 6 deletions

View file

@ -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;

View file

@ -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;
}
}));
});
/**