Speed up renaming of colored tags
This commit is contained in:
parent
6a2611c9c6
commit
3829f12603
1 changed files with 12 additions and 10 deletions
|
@ -290,16 +290,18 @@ Zotero.Tags = new function() {
|
|||
}.bind(this));
|
||||
|
||||
if (oldColorData) {
|
||||
// Remove color from old tag
|
||||
yield this.setColor(libraryID, oldName);
|
||||
|
||||
// Add color to new tag
|
||||
yield this.setColor(
|
||||
libraryID,
|
||||
newName,
|
||||
oldColorData.color,
|
||||
oldColorData.position
|
||||
);
|
||||
yield Zotero.DB.executeTransaction(function* () {
|
||||
// Remove color from old tag
|
||||
yield this.setColor(libraryID, oldName);
|
||||
|
||||
// Add color to new tag
|
||||
yield this.setColor(
|
||||
libraryID,
|
||||
newName,
|
||||
oldColorData.color,
|
||||
oldColorData.position
|
||||
);
|
||||
}.bind(this));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue