Select items after importing from clipboard

And wait for async switch to My Library if in a non-editable view
This commit is contained in:
Dan Stillman 2016-12-09 06:12:05 -05:00
parent bb246e5514
commit 4d77977a29

View File

@ -260,10 +260,21 @@ var Zotero_File_Interface = new function() {
try {
if (!ZoteroPane.collectionsView.editable) {
ZoteroPane.collectionsView.selectLibrary(null);
yield ZoteroPane.collectionsView.selectLibrary();
}
} catch(e) {}
yield _finishImport(translation, false);
// Select imported items
try {
if (translation.newItems) {
ZoteroPane.itemsView.selectItems(translation.newItems.map(item => item.id));
}
}
catch (e) {
Zotero.logError(e, 2);
}
});