From a9233af42854511988bfbac91a5a9425f4fa32ce Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 23 Jan 2010 08:22:46 +0000 Subject: [PATCH] Fix UI badness and "Item already exists outside of collection" error duplicating a child note --- chrome/content/zotero/overlay.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index dba718733..c7406587f 100644 --- 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); }