From 2029d2aebd87a9a6fed4f15ae2de24c03cdd8d04 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 8 Aug 2009 18:06:44 +0000 Subject: [PATCH] Fix items in collection not appearing immediately after an import with new system --- chrome/content/zotero/xpcom/itemTreeView.js | 10 ++++++++++ chrome/content/zotero/xpcom/zotero.js | 4 ---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/itemTreeView.js b/chrome/content/zotero/xpcom/itemTreeView.js index 1d9eb3f039..1230d5ad0e 100644 --- a/chrome/content/zotero/xpcom/itemTreeView.js +++ b/chrome/content/zotero/xpcom/itemTreeView.js @@ -98,6 +98,16 @@ Zotero.ItemTreeView.prototype.setTree = function(treebox) // Generate the tree contents in a timer to allow message above to display var paneLoader = function(obj) { + if (Zotero.locked) { + var msg = "Zotero is locked -- not loading items tree"; + Zotero.debug(msg, 2); + + if (obj._ownerDocument.defaultView.ZoteroPane) { + obj._ownerDocument.defaultView.ZoteroPane.clearItemsPaneMessage(); + } + return; + } + // If a DB transaction is open, display error message and bail if (!Zotero.stateCheck()) { if (obj._ownerDocument.defaultView.ZoteroPane) { diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 58663eac41..557c63bf6e 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -394,10 +394,6 @@ var Zotero = new function(){ * Check if a DB transaction is open and, if so, disable Zotero */ function stateCheck() { - if (Zotero.locked) { - return true; - } - if (Zotero.DB.transactionInProgress()) { this.initialized = false; this.skipLoading = true;