mirror of
https://github.com/zotero/zotero.git
synced 2026-10-03 02:21:49 +00:00
Refresh document with delayed citation updates when changing style
Closes #4974
This commit is contained in:
parent
ef8de73d5a
commit
b538b12d51
1 changed files with 3 additions and 2 deletions
|
|
@ -890,7 +890,8 @@ Zotero.Integration.Interface.prototype.setDocPrefs = Zotero.Promise.coroutine(fu
|
|||
|
||||
// Perform noteType or fieldType conversion
|
||||
let fields = yield this._session.getFields();
|
||||
|
||||
|
||||
const styleHasChanged = oldData.style.styleID != this._session.data.style.styleID;
|
||||
var convertBibliographies = oldData.prefs.fieldType != this._session.data.prefs.fieldType;
|
||||
var convertItems = convertBibliographies
|
||||
|| oldData.prefs.noteType != this._session.data.prefs.noteType;
|
||||
|
|
@ -923,7 +924,7 @@ Zotero.Integration.Interface.prototype.setDocPrefs = Zotero.Promise.coroutine(fu
|
|||
this._session._fields = null;
|
||||
this._session.ignoreEmptyBibliography = true;
|
||||
|
||||
if (this._session.data.prefs.delayCitationUpdates && !fieldsToConvert.length) return;
|
||||
if (this._session.data.prefs.delayCitationUpdates && !fieldsToConvert.length && !styleHasChanged) return;
|
||||
|
||||
yield this._session.updateFromDocument(FORCE_CITATIONS_RESET_TEXT);
|
||||
return this._session.updateDocument(FORCE_CITATIONS_RESET_TEXT, true, true);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue