diff --git a/chrome/content/zotero/containers/tagSelector.jsx b/chrome/content/zotero/containers/tagSelector.jsx index 67f9af561f..3987a3760e 100644 --- a/chrome/content/zotero/containers/tagSelector.jsx +++ b/chrome/content/zotero/containers/tagSelector.jsx @@ -30,9 +30,11 @@ Zotero.TagSelector = class TagSelectorContainer extends React.Component { this.selectedTags = new Set(); this.state = defaults; } - + // Update trigger #1 (triggered by ZoteroPane) async onItemViewChanged({collectionTreeRow, libraryID, tagsInScope}) { + Zotero.debug('Updating tag selector from current view'); + this.collectionTreeRow = collectionTreeRow || this.collectionTreeRow; let newState = {loaded: true}; @@ -51,6 +53,7 @@ Zotero.TagSelector = class TagSelectorContainer extends React.Component { async notify(event, type, ids, extraData) { if (type === 'setting') { if (ids.some(val => val.split('/')[1] == 'tagColors')) { + Zotero.debug("Updating tag selector after tag color change"); let tagColors = Zotero.Tags.getColors(this.libraryID); this.state.tagColors = tagColors; this.setState({tagColors, tags: await this.getTags(null, tagColors)}); @@ -93,6 +96,7 @@ Zotero.TagSelector = class TagSelectorContainer extends React.Component { // TODO: Check libraryID for some events to avoid refreshing unnecessarily on sync changes? + Zotero.debug("Updating tag selector after tag change"); var newTags = await this.getTags(); if (type == 'item-tag' && event == 'remove') { diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index a21baa69cc..6c9bb8d9b5 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -1156,7 +1156,6 @@ var ZoteroPane = new function() this.setTagScope = async function () { var collectionTreeRow = self.getCollectionTreeRow(); if (self.tagSelectorShown()) { - Zotero.debug('Updating tag selector with current tags'); if (collectionTreeRow.editable) { ZoteroPane_Local.tagSelector.setMode('edit'); }