Skip to content

Commit

Permalink
Fix exception when adding save action without selected formatter (#6072)
Browse files Browse the repository at this point in the history
  • Loading branch information
Siedlerchr authored Mar 6, 2020
1 parent fdd8797 commit a3d67cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where the group and the link column were not updated after changing the entry in the main table. [#5985](https://github.com/JabRef/jabref/issues/5985)
- We fixed an issue where reordering the groups was not possible after inserting an article. [#6008](https://github.com/JabRef/jabref/issues/6008)
- We fixed an issue where citation styles except the default "Preview" could not be used. [#56220](https://github.com/JabRef/jabref/issues/5622)
- We fixed an issue where an exception was thrown when adding a save action without a selected formatter in the library properties [#6069](https://github.com/JabRef/jabref/issues/6069)

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ private void buildLayout() {
actionsList = new ListView<>(actions);
actionsList.setMinHeight(100.0);
actionsList.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);

new ViewModelListCellFactory<FieldFormatterCleanup>()
.withText(action -> action.getField().getDisplayName() + ": " + action.getFormatter().getName())
.withStringTooltip(action -> action.getFormatter().getDescription())
Expand Down Expand Up @@ -179,6 +180,7 @@ private GridPane getSelectorPanel() {
.withStringTooltip(Formatter::getDescription)
.install(formattersCombobox);
EasyBind.subscribe(formattersCombobox.valueProperty(), e -> updateDescription());
formattersCombobox.getSelectionModel().selectFirst();
builder.add(formattersCombobox, 3, 1);

addButton = new Button(Localization.lang("Add"));
Expand Down

0 comments on commit a3d67cc

Please sign in to comment.