Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix import into current library issuing wrong message #6269

Merged
merged 3 commits into from
Apr 13, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed an issue with inconsistent capitalization of file extensions when downloading files [#6115](https://github.com/JabRef/jabref/issues/6115)
- We fixed the display of language and encoding in the preferences dialog. [#6130](https://github.com/JabRef/jabref/pull/6130)
- We fixed an issue where search full-text documents downloaded files with same name, overwriting existing files. [#6174](https://github.com/JabRef/jabref/pull/6174)
- We fixed an issue where when importing into current library an erroneous message "import cancelled" is displayed even though import is successful. [#6266](https://github.com/JabRef/jabref/issues/6266)

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import org.controlsfx.control.CheckListView;
import org.fxmisc.easybind.EasyBind;

public class ImportEntriesDialog extends BaseDialog<Void> {
public class ImportEntriesDialog extends BaseDialog<Boolean> {

public CheckListView<BibEntry> entriesListView;
public ButtonType importButton;
Expand Down Expand Up @@ -76,14 +76,14 @@ public ImportEntriesDialog(BibDatabaseContext database, BackgroundTask<ParserRes
Button btn = (Button) this.getDialogPane().lookupButton(importButton);
btn.disableProperty().bind(booleanBind);

setResultConverter(button -> {
setResultConverter(button -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jcampbell11245, thanks for your contribution.
Tiny issue: Indentation is moved to the left. ;-)

if (button == importButton) {
viewModel.importEntries(entriesListView.getCheckModel().getCheckedItems());
} else {
dialogService.notify(Localization.lang("Import canceled"));
}

return null;
return false;
});
}

Expand Down