From 5d8670db1d4c20f0e833e30573a8d2bdcb3fdb4d Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 13 Oct 2015 00:33:34 -0400 Subject: [PATCH] Fix additional causes of high CPU use from items list --- chrome/content/zotero/xpcom/data/item.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index e89e86b1a2..6e78c9209b 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -2054,6 +2054,7 @@ Zotero.Item.prototype.getFilePathAsync = Zotero.Promise.coroutine(function* () { // No associated files for linked URLs if (linkMode == Zotero.Attachments.LINK_MODE_LINKED_URL) { + this._updateAttachmentStates(false); return false; } @@ -2137,6 +2138,8 @@ Zotero.Item.prototype.getFilePathAsync = Zotero.Promise.coroutine(function* () { return false; } + this._updateAttachmentStates(true); + return file.path; } @@ -2146,6 +2149,8 @@ Zotero.Item.prototype.getFilePathAsync = Zotero.Promise.coroutine(function* () { return false; } + this._updateAttachmentStates(true); + return path; });