-
-
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
[WIP] Toggle group intersection/union solved #3739
Changes from 4 commits
a7bc60a
b3bc44e
735f114
c2a29c1
47c28d7
aa610ec
cda0a88
4713060
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -750,6 +750,13 @@ public void update() { | |
actions.put(Actions.REMOVE_FROM_GROUP, new GroupAddRemoveDialog(this, false, false)); | ||
actions.put(Actions.MOVE_TO_GROUP, new GroupAddRemoveDialog(this, true, true)); | ||
|
||
actions.put(Actions.INTERSECTION_PREF_GROUP, (BaseAction) () -> { | ||
System.out.println("blubb"); | ||
boolean state = Globals.prefs.getBoolean(JabRefPreferences.GROUP_INTERSECT_SELECTIONS); | ||
state = !state; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code is hard to understand and not clear on the first sight. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally you would have an enum with two states, e.g. GroupState... but in this case this might be an overkill. |
||
Globals.prefs.putBoolean(JabRefPreferences.GROUP_INTERSECT_SELECTIONS, state); | ||
}); | ||
|
||
actions.put(Actions.DOWNLOAD_FULL_TEXT, new FindFullTextAction(this)); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,6 +115,7 @@ public void setValues() { | |
keywordSeparator.setText(prefs.get(JabRefPreferences.KEYWORD_SEPARATOR)); | ||
autoAssignGroup.setSelected(prefs.getBoolean(JabRefPreferences.AUTO_ASSIGN_GROUP)); | ||
multiSelectionModeIntersection.setSelected(prefs.getBoolean(JabRefPreferences.GROUP_INTERSECT_SELECTIONS)); | ||
multiSelectionModeUnion.setSelected(!prefs.getBoolean(JabRefPreferences.GROUP_INTERSECT_SELECTIONS)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is really not a good idea. If you quickly go over the code you most certainly will oerlook the not sign. |
||
} | ||
|
||
@Override | ||
|
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.
remove