Skip to content

Commit 971f23a

Browse files
authored
Fix "Copy to" preferences (#12846)
1 parent 4d00774 commit 971f23a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/main/java/org/jabref/gui/edit/CopyToPreferences.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,19 @@ public void setShouldIncludeCrossReferences(boolean decision) {
2020
this.shouldIncludeCrossReferences.set(decision);
2121
}
2222

23+
public BooleanProperty shouldIncludeCrossReferencesProperty() {
24+
return shouldIncludeCrossReferences;
25+
}
26+
2327
public boolean getShouldAskForIncludingCrossReferences() {
2428
return shouldAskForIncludingCrossReferences.get();
2529
}
2630

2731
public void setShouldAskForIncludingCrossReferences(boolean decision) {
2832
this.shouldAskForIncludingCrossReferences.set(decision);
2933
}
34+
35+
public BooleanProperty shouldAskForIncludingCrossReferencesProperty() {
36+
return shouldAskForIncludingCrossReferences;
37+
}
3038
}

src/main/java/org/jabref/gui/preferences/JabRefGuiPreferences.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,10 @@ public CopyToPreferences getCopyToPreferences() {
427427
getBoolean(ASK_FOR_INCLUDING_CROSS_REFERENCES),
428428
getBoolean(INCLUDE_CROSS_REFERENCES)
429429
);
430+
431+
EasyBind.listen(copyToPreferences.shouldAskForIncludingCrossReferencesProperty(), (obs, oldValue, newValue) -> putBoolean(ASK_FOR_INCLUDING_CROSS_REFERENCES, newValue));
432+
EasyBind.listen(copyToPreferences.shouldIncludeCrossReferencesProperty(), (obs, oldValue, newValue) -> putBoolean(INCLUDE_CROSS_REFERENCES, newValue));
433+
430434
return copyToPreferences;
431435
}
432436

0 commit comments

Comments
 (0)