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 Drag and Drop on empty database #6503

Merged
merged 3 commits into from
May 21, 2020

Conversation

MootezSaaD
Copy link
Contributor

@MootezSaaD MootezSaaD commented May 19, 2020

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.

  • Change in CHANGELOG.md described (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

Copy link
Member

@tobiasdiez tobiasdiez left a 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 -> {
Copy link
Member

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?

Copy link
Contributor Author

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.

@tobiasdiez tobiasdiez added the status: changes required Pull requests that are not yet complete label May 21, 2020
@MootezSaaD
Copy link
Contributor Author

MootezSaaD commented May 21, 2020

Regarding the other point, when you drop a bib file in an opened db it would add the entries to that db. So I don't know if this is the desired behavior or not

Copy link
Member

@tobiasdiez tobiasdiez left a 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!

@tobiasdiez tobiasdiez marked this pull request as ready for review May 21, 2020 13:58
@tobiasdiez tobiasdiez added status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers and removed status: changes required Pull requests that are not yet complete labels May 21, 2020
CHANGELOG.md Outdated Show resolved Hide resolved
@Siedlerchr Siedlerchr merged commit 950d9c0 into JabRef:master May 21, 2020
@koppor
Copy link
Member

koppor commented Sep 17, 2020

Related: #121 (comment)

koppor pushed a commit that referenced this pull request May 1, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Opening BibTex file (doubleclick) from Folder with spaces not working
4 participants