Fix next duplicates set selection after merge (#2448)
This commit is contained in:
parent
3356557493
commit
a5b3d6440b
2 changed files with 8 additions and 4 deletions
|
@ -759,7 +759,10 @@ var ItemTree = class ItemTree extends LibraryTree {
|
|||
}
|
||||
// On removal of a selected row, select item at previous position
|
||||
else if (savedSelection.length) {
|
||||
if ((action == 'remove' || action == 'trash' || action == 'delete')
|
||||
if ((action == 'remove'
|
||||
|| action == 'trash'
|
||||
|| action == 'delete'
|
||||
|| action == 'removeDuplicatesMaster')
|
||||
&& savedSelection.some(id => this.getRowIndexByID(id) === false)) {
|
||||
// In duplicates view, select the next set on delete
|
||||
if (collectionTreeRow.isDuplicates()) {
|
||||
|
|
|
@ -1013,13 +1013,14 @@ Zotero.Items = function() {
|
|||
}
|
||||
|
||||
item.setField('dateAdded', earliestDateAdded);
|
||||
|
||||
// Hack to remove master item from duplicates view without recalculating duplicates
|
||||
// Pass force = true so observers will be notified before this transaction is committed
|
||||
yield Zotero.Notifier.trigger('removeDuplicatesMaster', 'item', item.id, null, true);
|
||||
|
||||
for (let i in toSave) {
|
||||
yield toSave[i].save();
|
||||
}
|
||||
|
||||
// Hack to remove master item from duplicates view without recalculating duplicates
|
||||
Zotero.Notifier.trigger('removeDuplicatesMaster', 'item', item.id);
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue