-
-
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 Drag and Drop on empty database #6503
Conversation
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.
It's ok to only fix one aspect of an issue (especially if an issue is concerned with two different things as it is the case here).
The fix looks good to me. Thanks! Can you please double-check that it is still possible to drop a bib file to the main table (which should import the content of the file into the opened file instead of opening the file as a new tab). Please add a changelog as well.
@@ -202,6 +202,31 @@ private void initDragAndDrop() { | |||
.filter(node -> node.getStyleClass().contains("tab-header-area")) | |||
.findFirst() | |||
.orElseThrow(); | |||
// Add drag and drop listeners to JabRefFrame | |||
this.getScene().setOnDragOver(event -> { |
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 think the similar code for the tabHeaderArea
below can now be removed, since this is handled on the scene level. Right?
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.
Yes you are right, I have deleted the unnecessary code.
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.
Ok, good, that's the correct behavior.
Code looks good to me as well!
Related: #121 (comment) |
a985762505 Update environmental-and-engineering-geoscience.csl (#6512) 5118058ea0 Update norsk-henvisningsstandard-for-rettsvitenskapelige-tekster.csl (#6515) e9830d3f5e Create polish-archives-of-internal-medicine.csl (#6399) 05ef543bd6 Update ieee.csl (#6511) b6e6292e4b Update universite-de-bordeaux-ecole-doctorale-de-droit.csl (#6510) af38aba0e9 Create la-nouvelle-revue-du-travail.csl (#6400) 4b23d7a03e Create north-pacific-anadromous-fish-commission-bulletin.csl (#6436) 77ea82a242 Create journal-of-dental-traumatology.csl (#6403) af4578d1a7 Make magnetic-resonance-in-medicine.csl AMA dependent (#6433) 5467a4f901 Create medizinische-universitaet-innsbruck-vancouver.csl (#6484) 8a3c0a2b9b Update united-states-international-trade-commissio (#6487) 789267a9cb Update cardiff-university-harvard.csl (#6482) 252a5b5c08 Locators in palaeontology journal styles (#6496) 3d2bff0794 Update ecosistemas.csl (#6503) 199baca2c6 Bump nokogiri from 1.13.10 to 1.14.3 (#6504) feffe61ae4 Update universite-du-quebec-a-montreal-etudes-litteraires-et-semiologie.csl (#6505) git-subtree-dir: buildres/csl/csl-styles git-subtree-split: a985762505418bd63c26a54c59b48e3ed7426953
Fixes #6487
Did as @Siedlerchr mentioned, I have added the drag and drop listeners to jabref's frame.
However, I could not reproduce the first part of the issue (double-clicking on the bib file), it works on my side, that is why I have opened a draft PR.