From 1a531e78c56446f62a3711e9e1c447cf13f8bf29 Mon Sep 17 00:00:00 2001 From: Siedlerchr Date: Mon, 6 Nov 2023 22:03:23 +0100 Subject: [PATCH] fix logic --- src/main/java/org/jabref/gui/LibraryTab.java | 5 +++-- .../jabref/gui/preferences/linkedfiles/LinkedFilesTab.fxml | 2 +- .../preferences/linkedfiles/LinkedFilesTabViewModel.java | 4 ++-- src/main/java/org/jabref/preferences/FilePreferences.java | 6 +++--- src/main/java/org/jabref/preferences/JabRefPreferences.java | 2 +- src/main/resources/l10n/JabRef_en.properties | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/jabref/gui/LibraryTab.java b/src/main/java/org/jabref/gui/LibraryTab.java index c5c10e97768..8056d57ee18 100644 --- a/src/main/java/org/jabref/gui/LibraryTab.java +++ b/src/main/java/org/jabref/gui/LibraryTab.java @@ -736,7 +736,7 @@ private boolean showDeleteConfirmationDialog(int numberOfEntries) { * @return true if user confirm to delete attached files */ private boolean showLinkedFileDeleteConfirmationDialog(List linkedFileList) { - if (preferencesService.getFilePreferences().alwaysDeleteLinkedFile()) { + if (preferencesService.getFilePreferences().confirmDeleteLinkedFile()) { return true; } String title = Localization.lang("Delete attached file(s)"); @@ -755,7 +755,8 @@ private boolean showLinkedFileDeleteConfirmationDialog(List linkedFi okButton, cancelButton, Localization.lang("Always delete attached file(s)"), - optOut -> preferencesService.getFilePreferences().setAlwaysDeleteLinkedFile(optOut)); + // false => confirm delete + optOut -> preferencesService.getFilePreferences().confirmDeleteLinkedFile(!optOut)); } /** diff --git a/src/main/java/org/jabref/gui/preferences/linkedfiles/LinkedFilesTab.fxml b/src/main/java/org/jabref/gui/preferences/linkedfiles/LinkedFilesTab.fxml index e853a8a7c2d..61caaa4b77c 100644 --- a/src/main/java/org/jabref/gui/preferences/linkedfiles/LinkedFilesTab.fxml +++ b/src/main/java/org/jabref/gui/preferences/linkedfiles/LinkedFilesTab.fxml @@ -78,6 +78,6 @@