commit a9233af42854511988bfbac91a5a9425f4fa32ce
parent 55c9e50d080c9146b3e661c02a5a1851668a8e8a
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 23 Jan 2010 08:22:46 +0000
Fix UI badness and "Item already exists outside of collection" error duplicating a child note
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js
@@ -1254,6 +1254,8 @@ var ZoteroPane = new function()
var item = this.getSelectedItems()[0];
+ Zotero.DB.beginTransaction();
+
// Create new unsaved clone item in target library
var newItem = new Zotero.Item(item.itemTypeID);
newItem.libraryID = item.libraryID;
@@ -1267,6 +1269,9 @@ var ZoteroPane = new function()
if (this.itemsView._itemGroup.isCollection() && !newItem.getSource()) {
this.itemsView._itemGroup.ref.addItem(newItem.id);
}
+
+ Zotero.DB.commitTransaction();
+
this.selectItem(newItem.id);
}