From 486d55a2e819ee70a515fc051d94da5eafa6deaf Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 5 Jan 2007 21:08:01 +0000 Subject: [PATCH] Addresses #482, Tag selector does not refresh on import/delete This addresses the delete problem. I need to talk to Simon about the import one. --- chrome/content/zotero/xpcom/itemTreeView.js | 6 +++++- chrome/content/zotero/xpcom/notifier.js | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/itemTreeView.js b/chrome/content/zotero/xpcom/itemTreeView.js index 23fd83ddc..871610115 100644 --- a/chrome/content/zotero/xpcom/itemTreeView.js +++ b/chrome/content/zotero/xpcom/itemTreeView.js @@ -207,7 +207,11 @@ Zotero.ItemTreeView.prototype.notify = function(action, type, ids) else { var item = Zotero.Items.get(ids[i]); - + if (!item) { + // DEBUG: this shouldn't really happen but could if a + // modify comes in after a delete + continue; + } if(item.isRegularItem() || !item.getSource()) { //most likely, the note or attachment's parent was removed. diff --git a/chrome/content/zotero/xpcom/notifier.js b/chrome/content/zotero/xpcom/notifier.js index 0b39cf5b9..ddee8363e 100644 --- a/chrome/content/zotero/xpcom/notifier.js +++ b/chrome/content/zotero/xpcom/notifier.js @@ -267,6 +267,9 @@ Zotero.Notifier = new function(){ } + /* + * These should probably no longer be used now that we have event queuing + */ function disable(){ Zotero.debug('Disabling Notifier notifications'); _disabled = true;