-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Conversation
This change fixes JabRef#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.
Welcome to JabRef and thanks for your contribution! |
Hello, since this issue is a duplicate of #4841 I followed the comments on that issue and implemented your possible solution which resolved the issue. To be honest I do not know exactly how this fixed the issue. |
@@ -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 -> { |
There was a problem hiding this comment.
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. ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation. I already forgot about this bug.
I went through all dialogs and found one further instance where this problem occurs:
jabref/src/main/java/org/jabref/gui/externalfiles/FindUnlinkedFilesDialog.java
Lines 191 to 200 in 64e35c1
setResultConverter(buttonPressed -> { | |
if (buttonPressed == buttonTypeImport) { | |
startImport(); | |
} else { | |
if (findUnlinkedFilesTask != null) { | |
findUnlinkedFilesTask.cancel(); | |
} | |
} | |
return null; | |
}); |
Would be nice if you could fix this as well.
…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.
I have pushed a commit fixing the indentation and fixing the problem in the FindUnlinkedFilesDialog. |
Thanks again for your contribution! 👍 We hope you are interested in contributing further ;) |
You're welcome! This was fun. I hope to contribute further as well. |
13fd98e Update journal-of-medical-internet-research.csl (#6217) f7acad2 Updating file to maintain Abertay's Style guide (#6223) 0c4eaae Update physiotherapy-theory-and-practice.csl (#6210) 2d404f0 Hanging indent was missing in style (#6278) a2fb539 Bump nokogiri from 1.13.6 to 1.13.9 (#6277) 5a40394 Create arcadia-science.csl (#6078) 750495a Update ieee.csl (#6269) e55930f Update and rename dependent/veterinary-record-open.csl to veterinary-record-open.csl (#6273) git-subtree-dir: buildres/csl/csl-styles git-subtree-split: 13fd98e
This change fixes #6266 in which an erroneous message "import canceled" 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.