www

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

commit 39e8b226cb0845aad8714b34d42a8ff4535fd281
parent b3640a8ae15926bd9d28ec80c75bb00a156b6b81
Author: Simon Kornblith <simon@simonster.com>
Date:   Tue, 22 Jan 2013 17:25:50 -0500

Revert "Don't refresh item list upon tag selector actions unless the action changes the item list."

This reverts commit 7f732f56df4074a0af7a685481e570cbb3f7a5c4.

Diffstat:
Mchrome/content/zotero/xpcom/collectionTreeView.js | 7+------
Mchrome/content/zotero/xpcom/itemTreeView.js | 7++-----
Mchrome/content/zotero/zoteroPane.js | 8+-------
3 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -2198,19 +2198,14 @@ Zotero.ItemGroup.prototype.getChildTags = function() { Zotero.ItemGroup.prototype.setSearch = function(searchText) { - if(searchText === this.searchText) return false; Zotero.ItemGroupCache.clear(); this.searchText = searchText; - return true; } Zotero.ItemGroup.prototype.setTags = function(tags) { - if((!tags || Zotero.Utilities.isEmpty(tags)) - && (!this.tags || Zotero.Utilities.isEmpty(this.tags))) return false; Zotero.ItemGroupCache.clear(); - this.tags = Zotero.Utilities.deepCopy(tags); - return true; + this.tags = tags; } /* diff --git a/chrome/content/zotero/xpcom/itemTreeView.js b/chrome/content/zotero/xpcom/itemTreeView.js @@ -1733,18 +1733,16 @@ Zotero.ItemTreeView.prototype.setFilter = function(type, data) { var savedOpenState = this.saveOpenState(); var savedFirstRow = this.saveFirstRow(); - var isDirty; switch (type) { case 'search': - isDirty = this._itemGroup.setSearch(data); + this._itemGroup.setSearch(data); break; case 'tags': - isDirty = this._itemGroup.setTags(data); + this._itemGroup.setTags(data); break; default: throw ('Invalid filter type in setFilter'); } - if(!isDirty) return false; var oldCount = this.rowCount; this.refresh(); @@ -1759,7 +1757,6 @@ Zotero.ItemTreeView.prototype.setFilter = function(type, data) { //Zotero.debug('Running callbacks in itemTreeView.setFilter()', 4); this._runCallbacks(); - return true; } diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js @@ -1037,13 +1037,7 @@ var ZoteroPane = new function() */ function updateTagFilter(){ if (this.itemsView) { - // If setFilter returns false, that means the tags didn't change. In that - // case, callbacks don't get called, so we need to update tags in the tag - // selector on our own. - if(!this.itemsView.setFilter('tags', getTagSelection())) { - var tagSelector = document.getElementById('zotero-tag-selector'); - tagSelector.refresh(); - } + this.itemsView.setFilter('tags', getTagSelection()); } }