diff --git a/src/main/java/org/jabref/gui/contentselector/ContentSelectorDialogView.java b/src/main/java/org/jabref/gui/contentselector/ContentSelectorDialogView.java index 2fecb87d0263..713d3992aa82 100644 --- a/src/main/java/org/jabref/gui/contentselector/ContentSelectorDialogView.java +++ b/src/main/java/org/jabref/gui/contentselector/ContentSelectorDialogView.java @@ -23,8 +23,6 @@ public class ContentSelectorDialogView extends BaseDialog { - private static final int FIRST_ELEMENT = 0; - @FXML private Button addFieldNameButton; @FXML @@ -109,7 +107,7 @@ private void removeKeyword() { private void initListView(ListView listViewToInit, Supplier> backingList) { listViewToInit.itemsProperty().bind(backingList.get()); - listViewToInit.getSelectionModel().select(FIRST_ELEMENT); + listViewToInit.getSelectionModel().selectFirst(); } private Optional getSelectedFieldName() {