diff --git a/CHANGELOG.md b/CHANGELOG.md index 311448b4ef2..6cdaae90658 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve ### Changed +- We disabled the conversion menu for empty fields [#9200](https://github.com/JabRef/jabref/issues/9200) - We upgraded to Lucene 9.4 for the fulltext search. Thus, the now created search index cannot be read from older versions of JabRef anylonger. ⚠️ JabRef will recreate the index in a new folder for new files and this will take a long time for a huge library. diff --git a/src/main/java/org/jabref/gui/fieldeditors/contextmenu/DefaultMenu.java b/src/main/java/org/jabref/gui/fieldeditors/contextmenu/DefaultMenu.java index c73686663f5..114c646fd4d 100644 --- a/src/main/java/org/jabref/gui/fieldeditors/contextmenu/DefaultMenu.java +++ b/src/main/java/org/jabref/gui/fieldeditors/contextmenu/DefaultMenu.java @@ -15,6 +15,9 @@ import org.jabref.logic.cleanup.Formatter; import org.jabref.logic.formatter.Formatters; import org.jabref.logic.l10n.Localization; +import org.jabref.model.strings.StringUtil; + +import com.tobiasdiez.easybind.EasyBind; public class DefaultMenu implements Supplier> { @@ -62,6 +65,7 @@ private static Menu getConversionMenu(TextInputControl textInputControl) { CustomMenuItem menuItem = new CustomMenuItem(new Label(converter.getName())); Tooltip toolTip = new Tooltip(converter.getDescription()); Tooltip.install(menuItem.getContent(), toolTip); + EasyBind.subscribe(textInputControl.textProperty(), value -> menuItem.setDisable(StringUtil.isNullOrEmpty(value))); menuItem.setOnAction(event -> textInputControl.textProperty().set(converter.format(textInputControl.textProperty().get()))); submenu.getItems().add(menuItem);