www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 0dd35b952a47bb0a964387a3f7680eb926c83455
parent 64455e656e9f446f44223432b0fe73910351e475
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 27 Jun 2012 17:11:37 -0400

Don't clear quicksearch on delete

Diffstat:
Mchrome/content/zotero/xpcom/itemTreeView.js | 19++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/xpcom/itemTreeView.js b/chrome/content/zotero/xpcom/itemTreeView.js @@ -525,9 +525,22 @@ Zotero.ItemTreeView.prototype.notify = function(action, type, ids, extraData) // If quicksearch, re-run it, since the results may have changed else { - quicksearch.doCommand(); - madeChanges = true; - sort = true; + // If not viewing trash and all items were deleted, ignore modify + var allDeleted = true; + if (!itemGroup.isTrash()) { + var items = Zotero.Items.get(ids); + for each(var item in items) { + if (!item.deleted) { + allDeleted = false; + break; + } + } + } + if (!allDeleted) { + quicksearch.doCommand(); + madeChanges = true; + sort = true; + } } } else if(action == 'add')