Skip to content

Commit

Permalink
Fix wrong button order (Apply and Cancel) in ManageProtectedTermsDial…
Browse files Browse the repository at this point in the history
…og. (#6358)

* Fix wrong button order (Apply and Cancel) in ManageProtectedTermsDialog.

* Fix code style.
Change button text 'Apply' to 'Save'.
  • Loading branch information
dextep authored Apr 27, 2020
1 parent c0e1a42 commit 5292a70
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve

### Fixed

- We fixed wrong button order (Apply and Cancel) in ManageProtectedTermsDialog.
- We greatly improved the performance of the overall application and many operations. [#5071](https://github.com/JabRef/jabref/issues/5071)
- We fixed an issue where sort by priority was broken. [#6222](https://github.com/JabRef/jabref/issues/6222)
- We fixed an issue where opening a library from the recent libraries menu was not possible. [#5939](https://github.com/JabRef/jabref/issues/5939)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
</HBox>
</VBox>
</content>
<ButtonType buttonData="OK_DONE" text="%Save" />
<ButtonType fx:constant="CANCEL"/>
<ButtonType fx:constant="APPLY"/>
</DialogPane>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import javax.inject.Inject;

import javafx.fxml.FXML;
import javafx.scene.control.ButtonType;
import javafx.scene.control.ButtonBar;
import javafx.scene.control.ContextMenu;
import javafx.scene.control.MenuItem;
import javafx.scene.control.TableColumn;
Expand Down Expand Up @@ -48,7 +48,7 @@ public ManageProtectedTermsDialog() {
.setAsDialogPane(this);

setResultConverter(button -> {
if (button == ButtonType.APPLY) {
if (button.getButtonData() == ButtonBar.ButtonData.OK_DONE) {
viewModel.save();
}
return null;
Expand Down

0 comments on commit 5292a70

Please sign in to comment.