From bdcb11af8e62f5cef3c3e7a1732d47c1d49547a1 Mon Sep 17 00:00:00 2001 From: Carl Christian Snethlage Date: Fri, 21 Feb 2020 14:38:15 +0100 Subject: [PATCH 1/2] Fixed loosing group if the most bottom one in list is dragged on itself --- src/main/java/org/jabref/gui/groups/GroupNodeViewModel.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/groups/GroupNodeViewModel.java b/src/main/java/org/jabref/gui/groups/GroupNodeViewModel.java index e8cb54656c7..2b0d70b4885 100644 --- a/src/main/java/org/jabref/gui/groups/GroupNodeViewModel.java +++ b/src/main/java/org/jabref/gui/groups/GroupNodeViewModel.java @@ -291,10 +291,14 @@ public Optional getParent() { } public void draggedOn(GroupNodeViewModel target, DroppingMouseLocation mouseLocation) { + // No action, if the target is the same as the source + if (this.equals(target)) { + return; + } + Optional targetParent = target.getParent(); if (targetParent.isPresent()) { int targetIndex = target.getPositionInParent(); - // In case we want to move an item in the same parent // and the item is moved down, we need to adjust the target index if (targetParent.equals(getParent())) { From df5b1fa1526ae9667037575dac31f42c87062474 Mon Sep 17 00:00:00 2001 From: Carl Christian Snethlage Date: Fri, 21 Feb 2020 14:44:28 +0100 Subject: [PATCH 2/2] CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dc54a7340b..0b59e699bf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# ### Changed -- We reintroduced the possibility to extract references from plain text (using GROBID) [#5614](https://github.com/JabRef/jabref/pull/5614) +- We reintroduced the possibility to extract references from plain text (using GROBID) [#5614](https://github.com/JabRef/jabref/pull/5614) - We changed the open office panel to show buttons in rows of three instead of going straight down to save space as the button expanded out to take up unnecessary horizontal space. [#5479](https://github.com/JabRef/jabref/issues/5479) - We cleaned up the group add/edit dialog. [#5826](https://github.com/JabRef/jabref/pull/5826) - We reintroduced the index column. [#5844](https://github.com/JabRef/jabref/pull/5844) @@ -42,6 +42,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - We fixed an issue in the optics of the library properties, that cropped the dialog on scaled displays. [#5969](https://github.com/JabRef/jabref/issues/5969) - We fixed an issue where changing the type of an entry did not update the main table. [#5906](https://github.com/JabRef/jabref/issues/5906) - We fixed an issue where opening a library from the recent libraries menu was not possible. [#5939](https://github.com/JabRef/jabref/issues/5939) +- We fixed an issue where the most bottom group in the list got lost, if it was dragged on itself. [#5983](https://github.com/JabRef/jabref/issues/5983) ### Removed