Skip to content

Commit

Permalink
JabRef#8189 - changing a group color, no dialog should appear
Browse files Browse the repository at this point in the history
Signed-off-by: yukioz <[email protected]>
  • Loading branch information
yukioz committed Apr 3, 2022
1 parent 92071e3 commit 551c28e
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/main/java/org/jabref/gui/groups/GroupTreeViewModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,21 @@ public void editGroup(GroupNodeViewModel oldGroup) {

newGroup.ifPresent(group -> {
// TODO: Keep assignments
boolean keepPreviousAssignments = dialogService.showConfirmationDialogAndWait(
Localization.lang("Change of Grouping Method"),
Localization.lang("Assign the original group's entries to this group?"));

boolean keepPreviousAssignments;

if(!group.getName().equals(oldGroup.getDisplayName())) {

System.out.println(group.getName());
System.out.println(oldGroup.getDisplayName());

keepPreviousAssignments = dialogService.showConfirmationDialogAndWait(
Localization.lang("Change of Grouping Method"),
Localization.lang("Assign the original group's entries to this group?"));
}
else {
keepPreviousAssignments = false;
}
// WarnAssignmentSideEffects.warnAssignmentSideEffects(newGroup, panel.frame());
boolean removePreviousAssignments = (oldGroup.getGroupNode().getGroup() instanceof ExplicitGroup)
&& (group instanceof ExplicitGroup);
Expand Down

0 comments on commit 551c28e

Please sign in to comment.