diff --git a/chrome/content/zotero/xpcom/data/library.js b/chrome/content/zotero/xpcom/data/library.js index d9b28e9ae..7ab8c0011 100644 --- a/chrome/content/zotero/xpcom/data/library.js +++ b/chrome/content/zotero/xpcom/data/library.js @@ -458,6 +458,10 @@ Zotero.Library.prototype._saveData = Zotero.Promise.coroutine(function* (env) { let sql = "UPDATE libraries SET " + changedCols.map(function(v) v + "=?").join(", ") + " WHERE libraryID=?"; yield Zotero.DB.queryAsync(sql, params); + + // Since these are Zotero.Library properties, the 'modify' for the inheriting object may not + // get triggered, so call it here too + Zotero.Notifier.queue('modify', this.libraryType, this.libraryTypeID); } else { Zotero.debug("Library data did not change for " + this._objectType + " " + this.id, 5); } diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 298d7ffac..53b81a232 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -1128,6 +1128,9 @@ var ZoteroPane = new function() if (this.itemsView && this.itemsView.collectionTreeRow.id == collectionTreeRow.id) { Zotero.debug("Collection selection hasn't changed"); + + // Update toolbar, in case editability has changed + this._updateToolbarIconsForRow(collectionTreeRow); return; } @@ -1168,42 +1171,7 @@ var ZoteroPane = new function() collectionTreeRow.setSearch(''); collectionTreeRow.setTags(getTagSelection()); - // Enable or disable toolbar icons and menu options as necessary - const disableIfNoEdit = [ - "cmd_zotero_newCollection", - "cmd_zotero_newSavedSearch", - "zotero-tb-add", - "cmd_zotero_newItemFromCurrentPage", - "zotero-tb-lookup", - "cmd_zotero_newStandaloneNote", - "zotero-tb-note-add", - "zotero-tb-attachment-add" - ]; - for(var i=0; i