Skip to content

Commit

Permalink
Fix import into current library issuing wrong message (#6269)
Browse files Browse the repository at this point in the history
* Fix import into current library issuing wrong message (#6266)

This change fixes #6266 in which an erroneous message "import cancelled" is displayed when importing into the current library. This fix was accomplished by modifying the parameter of the extends clause of the ImportEntriesDialog class to have a return type of Boolean rather than Void and making setResultConverter return false rather than null.

* Reformat ImportEntriesDialog and Fix setResultConverter return value in FindUnlinkedFilesDialog

I have added back the proper indentation for line 79 of ImportEntriesDialog and changed the return value to Boolean and returned false in FindUnlinkedFilesDialog.

Co-authored-by: Christoph <siedlerkiller@gmail.com>
  • Loading branch information
jcampbell11245 and Siedlerchr authored Apr 13, 2020
1 parent 67b1203 commit fe79e51
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ 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 fixe an issue where custom jstyles for Open/LibreOffice where not saved correctly. [#6170](https://github.com/JabRef/jabref/issues/6170)
- 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)
- We fixed an issue where custom jstyles for Open/LibreOffice where not saved correctly. [#6170](https://github.com/JabRef/jabref/issues/6170)


### Removed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
/**
* GUI Dialog for the feature "Find unlinked files".
*/
public class FindUnlinkedFilesDialog extends BaseDialog<Void> {
public class FindUnlinkedFilesDialog extends BaseDialog<Boolean> {

private static final Logger LOGGER = LoggerFactory.getLogger(FindUnlinkedFilesDialog.class);
private final BibDatabaseContext databaseContext;
Expand Down Expand Up @@ -196,7 +196,7 @@ private void initialize() {
findUnlinkedFilesTask.cancel();
}
}
return null;
return false;
});

new ViewModelTreeCellFactory<FileNodeWrapper>()
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 @@ -84,7 +84,7 @@ public ImportEntriesDialog(BibDatabaseContext database, BackgroundTask<ParserRes
dialogService.notify(Localization.lang("Import canceled"));
}

return null;
return false;
});
}

Expand Down

0 comments on commit fe79e51

Please sign in to comment.