-
-
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
Making importing a single file easier (Issue #5508) #5513
Conversation
…cts said entry, making importing single files easier, referring to Isse JabRef#5508
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.
Welcome to JabRef and thanks a lot for your contribution!
The code added looks good. However, it's placed at a slightly convenient place as the withGraphic
handler is invoked for every item. Since the action needs to be done only once after all entries are added to the list, I propose to move the added code after the entriesListView
is initialized, i.e. after https://github.com/JabRef/jabref/pull/5513/files#diff-2a18170a87fa584872d07d90dbb8e9feR131
I would totally agree with you. But when I try that, it doesn't seem to select the entry. |
Usually, the problem is that the code is run before the control is initialized completely. To fix this it is usually sufficient to wrap everything in a |
…verything in 'initialize', including and excluding the if-statement
I tried to wrap the if-statement in a Platform.runLater(..) and it did not work. |
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.
That's really strange, but ok... Then please move the code again to where you had it in the first place (and add a small comment why it's placed there).
selectAllNewEntries(); | ||
} | ||
|
||
return container; |
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.
Now you have two return statements 🦊
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.
I am so sorry for all the inconveniences. I'll correct it immediately.
* upstream/master: (116 commits) New translations JabRef_en.properties (French) (#5564) Select newly added jstyle in table to prevent exception (#5556) Make entry editor DND behave as specified in settings (#5554) Disabled Windows directory picker temporarily Disabled Windows directory picker temporarily Adding wix script to support jpackage update Making importing a single file easier (Issue #5508) (#5513) Fix #5551 - Don't remove unwanted characters before first author is selected (#5558) Update JabRef_it.properties New translations JabRef_en.properties (Vietnamese) New translations JabRef_en.properties (Dutch) New translations JabRef_en.properties (French) New translations JabRef_en.properties (German) New translations JabRef_en.properties (Greek) New translations JabRef_en.properties (Indonesian) New translations JabRef_en.properties (Italian) New translations JabRef_en.properties (Japanese) New translations JabRef_en.properties (Danish) New translations JabRef_en.properties (Norwegian) New translations JabRef_en.properties (Polish) ...
Fixes #5508
I added a condition to see if only one entry is being imported.
If the condition adheres -> mark the entry as selected.