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

Fixes issue #9281: Let right-click menu more accurately represent selected (sub-)group(s) #9321

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve

### Fixed


- We fixed the clicked group removal option present, but actions are taken on all selected groups [#9281](https://github.com/JabRef/jabref/issues/9281)
- We fixed the Cleanup entries dialog is partially visible [#9223](https://github.com/JabRef/jabref/issues/9223)
- We fixed the display of the "Customize Entry Types" dialogue title [#9198](https://github.com/JabRef/jabref/issues/9198)
- We fixed an issue where author names with tilde accents (for example ñ) were marked as "Names are not in the standard BibTex format" [#8071](https://github.com/JabRef/jabref/issues/8071)
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/org/jabref/gui/groups/GroupTreeViewModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,11 @@ public void removeSubgroups(GroupNodeViewModel group) {

public void removeGroupKeepSubgroups(GroupNodeViewModel group) {
boolean confirmed;
// check whether the group is in selectedGroups, if not, we clear all selected group and add the current group into it by default
if (!selectedGroups.contains(group)) {
selectedGroups.clear();
selectedGroups.add(group);
}
if (selectedGroups.size() <= 1) {
confirmed = dialogService.showConfirmationDialogAndWait(
Localization.lang("Remove group"),
Expand Down Expand Up @@ -439,6 +444,12 @@ public void removeGroupKeepSubgroups(GroupNodeViewModel group) {
*/
public void removeGroupAndSubgroups(GroupNodeViewModel group) {
boolean confirmed;
// check whether the group is in selectedGroups, if not, we clear all selected group and add the current group into it by default
if (!selectedGroups.contains(group)) {
selectedGroups.clear();
selectedGroups.add(group);
}

if (selectedGroups.size() <= 1) {
confirmed = dialogService.showConfirmationDialogAndWait(
Localization.lang("Remove group and subgroups"),
Expand Down