diff --git a/CHANGELOG.md b/CHANGELOG.md index 48482f765e9..20f70eff80d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -126,6 +126,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We fixed an issue where identifier paste couldn't work with Unicode REPLACEMENT CHARACTER. [#11986](https://github.com/JabRef/jabref/issues/11986) - We fixed an issue when click on entry at "Check Integrity" wasn't properly focusing the entry and field. [#11997](https://github.com/JabRef/jabref/issues/11997) - We fixed an issue with the ui not scaling when changing the font size [#11219](https://github.com/JabRef/jabref/issues/11219) +- We fixed an issue where a custom application for external file types would not be saved [#112311](https://github.com/JabRef/jabref/issues/12311) ### Removed diff --git a/src/main/java/org/jabref/gui/preferences/externalfiletypes/ExternalFileTypesTabViewModel.java b/src/main/java/org/jabref/gui/preferences/externalfiletypes/ExternalFileTypesTabViewModel.java index a0c4866fc2e..d3c0a8aaf2b 100644 --- a/src/main/java/org/jabref/gui/preferences/externalfiletypes/ExternalFileTypesTabViewModel.java +++ b/src/main/java/org/jabref/gui/preferences/externalfiletypes/ExternalFileTypesTabViewModel.java @@ -82,7 +82,12 @@ public boolean edit(ExternalFileTypeItemViewModel type) { ExternalFileTypeItemViewModel typeToModify = new ExternalFileTypeItemViewModel(type.toExternalFileType()); showEditDialog(typeToModify, Localization.lang("Edit file type")); - if (!isValidExternalFileType(typeToModify)) { + if (type.extensionProperty().get().equals(typeToModify.extensionProperty().get())) { + if (withEmptyValue(typeToModify)) { + LOGGER.warn("One of the fields is empty or invalid. Not saving."); + return false; + } + } else if (!isValidExternalFileType(typeToModify)) { return false; } @@ -97,12 +102,12 @@ public void remove(ExternalFileTypeItemViewModel type) { public boolean isValidExternalFileType(ExternalFileTypeItemViewModel item) { if (withEmptyValue(item)) { - LOGGER.debug("One of the fields is empty or invalid."); + LOGGER.warn("One of the fields is empty or invalid. Not saving."); return false; } if (!isUniqueExtension(item)) { - LOGGER.debug("File Extension exists already."); + LOGGER.warn("File Extension already exists. Not saving."); return false; }