diff --git a/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java b/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java index b18e35dec49..9a7f39b350e 100644 --- a/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java +++ b/src/main/java/org/jabref/gui/entryeditor/citationrelationtab/CitationRelationsTab.java @@ -547,14 +547,13 @@ private void openPossibleDuplicateEntriesWindow(CitationRelationItem duplicateIt entriesMergeResult.ifPresentOrElse(mergeResult -> { BibEntry mergedEntry = mergeResult.mergedEntry(); - libraryTab.getMainTable().setCitationMergeMode(true); // update local entry of selected citation relation item listView.getItems().set(listView.getItems().indexOf(duplicateItem), new CitationRelationItem(duplicateItem.entry(), mergedEntry, true)); // Merge method is similar to MergeTwoEntriesAction#execute BibDatabase database = stateManager.getActiveDatabase().get().getDatabase(); - database.removeEntry(mergeResult.originalLeftEntry()); + libraryTab.getMainTable().setCitationMergeMode(true); database.insertEntry(mergedEntry); NamedCompound ce = new NamedCompound(Localization.lang("Merge entries"));