Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9930a72

Browse files
committed
LogFormatter: fix the storage of preferences with arbitrary key value
Both methods: 1. PrefService#putMap(String, Map<String, String>) 2. PrefService#putMap(Map<String, String>, String) exist, but have different semantics. Previously the first method was used, which worked only for key values starting with a slash "/".
1 parent a369534 commit 9930a72

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/scijava/ui/swing/console/LogFormatter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ public void applySettings() {
126126

127127
public void changeSetting(Field field, boolean visible) {
128128
if(prefService == null) return;
129-
Map<String, String> settings = prefService.getMap(prefKey);
129+
Map<String, String> settings = prefService.getMap(LogFormatter.class, prefKey);
130130
settings.put(field.toString(), Boolean.toString(visible));
131-
prefService.putMap(prefKey, settings);
131+
prefService.putMap(LogFormatter.class, settings, prefKey);
132132
}
133133
}

0 commit comments

Comments
 (0)