From fbbd5f01a30075fe310cdf9cf67814f66c9ad9cb Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Wed, 16 Oct 2024 06:54:51 +0200 Subject: [PATCH] Move statement closer to intended use --- .../entryeditor/citationrelationtab/CitationRelationsTab.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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"));