File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
jabgui/src/main/java/org/jabref/gui/preferences Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -414,6 +414,7 @@ public void clear() throws BackingStoreException {
414414
415415 getWorkspacePreferences ().setAll (WorkspacePreferences .getDefault ());
416416 getGuiPreferences ().setAll (CoreGuiPreferences .getDefault ());
417+ getSpecialFieldsPreferences ().setAll (SpecialFieldsPreferences .getDefault ());
417418 }
418419
419420 @ Override
@@ -423,6 +424,7 @@ public void importPreferences(Path file) throws JabRefException {
423424 // in case of incomplete or corrupt xml fall back to current preferences
424425 getWorkspacePreferences ().setAll (getWorkspacePreferencesFromBackingStore (getWorkspacePreferences ()));
425426 getGuiPreferences ().setAll (getCoreGuiPreferencesFromBackingStore (getGuiPreferences ()));
427+ getSpecialFieldsPreferences ().setAll (getSpecialFieldsPreferencesFromBackingStore (getSpecialFieldsPreferences ()));
426428 }
427429
428430 // region EntryEditorPreferences
@@ -856,6 +858,11 @@ public SpecialFieldsPreferences getSpecialFieldsPreferences() {
856858 return specialFieldsPreferences ;
857859 }
858860
861+ private SpecialFieldsPreferences getSpecialFieldsPreferencesFromBackingStore (SpecialFieldsPreferences defaults ) {
862+ return new SpecialFieldsPreferences (
863+ getBoolean (SPECIALFIELDSENABLED , defaults .isSpecialFieldsEnabled ()));
864+ }
865+
859866 // region Preview preferences
860867 public PreviewPreferences getPreviewPreferences () {
861868 if (previewPreferences != null ) {
You can’t perform that action at this time.
0 commit comments