From 1e0674cf7cd5a229f763d95abd257b1a4cf772ca Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 21 Nov 2013 19:52:13 -0500 Subject: [PATCH] Fix some bugs adding items to various views - Refresh Unfiled Items view when items are added - Fix brief freeze ("too much recursion") adding an item to a search where the new item doesn't appear. Now, select the library root instead if a manually added item doesn't appear in the current view. - Fix immediate closing of title field when adding an item to a collection rather than the library root --- chrome/content/zotero/xpcom/itemTreeView.js | 17 ++++++++--------- chrome/content/zotero/zoteroPane.js | 6 +++++- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/chrome/content/zotero/xpcom/itemTreeView.js b/chrome/content/zotero/xpcom/itemTreeView.js index 5b25c77c2..3aac626a4 100644 --- a/chrome/content/zotero/xpcom/itemTreeView.js +++ b/chrome/content/zotero/xpcom/itemTreeView.js @@ -317,6 +317,8 @@ Zotero.ItemTreeView.prototype._refreshGenerator = function() var usiDisabled = Zotero.UnresponsiveScriptIndicator.disable(); + Zotero.ItemGroupCache.clear(); + this._searchMode = this._itemGroup.isSearchMode(); if (!this.selection.selectEventsSuppressed) { @@ -593,8 +595,6 @@ Zotero.ItemTreeView.prototype.notify = function(action, type, ids, extraData) // If trash or saved search, just re-run search if (itemGroup.isTrash() || itemGroup.isSearch()) { - Zotero.ItemGroupCache.clear(); - // Clear item type icons var items = Zotero.Items.get(ids); for (let i=0; i