@@ -248,10 +248,7 @@ public class JabRefGuiPreferences extends JabRefCliPreferences implements GuiPre
248248 private JabRefGuiPreferences () {
249249 super ();
250250
251- defaults .put (JOURNAL_POPUP , EntryEditorPreferences .JournalPopupEnabled .FIRST_START .toString ());
252-
253251 defaults .put (ENTRY_EDITOR_HEIGHT , 0.65 );
254- defaults .put (ENTRY_EDITOR_PREVIEW_DIVIDER_POS , 0.5 );
255252
256253 // region mergeDialogPreferences
257254 defaults .put (MERGE_ENTRIES_DIFF_MODE , DiffMode .WORD .name ());
@@ -425,6 +422,7 @@ public void clear() throws BackingStoreException {
425422 super .clear ();
426423
427424 getWorkspacePreferences ().setAll (WorkspacePreferences .getDefault ());
425+ getEntryEditorPreferences ().setAll (EntryEditorPreferences .getDefault ());
428426 }
429427
430428 @ Override
@@ -433,6 +431,7 @@ public void importPreferences(Path file) throws JabRefException {
433431
434432 // in case of incomplete or corrupt xml fall back to current preferences
435433 getWorkspacePreferences ().setAll (getWorkspacePreferencesFromBackingStore (getWorkspacePreferences ()));
434+ getEntryEditorPreferences ().setAll (getEntryEditorPreferencesFromBackingStore (getEntryEditorPreferences ()));
436435 }
437436
438437 // region EntryEditorPreferences
@@ -441,23 +440,7 @@ public EntryEditorPreferences getEntryEditorPreferences() {
441440 return entryEditorPreferences ;
442441 }
443442
444- entryEditorPreferences = new EntryEditorPreferences (
445- getEntryEditorTabs (),
446- getDefaultEntryEditorTabs (),
447- getBoolean (AUTO_OPEN_FORM ),
448- getBoolean (SHOW_RECOMMENDATIONS ),
449- getBoolean (SHOW_AI_SUMMARY ),
450- getBoolean (SHOW_AI_CHAT ),
451- getBoolean (SHOW_LATEX_CITATIONS ),
452- getBoolean (SMART_FILE_ANNOTATIONS ),
453- getBoolean (DEFAULT_SHOW_SOURCE ),
454- getBoolean (VALIDATE_IN_ENTRY_EDITOR ),
455- getBoolean (ALLOW_INTEGER_EDITION_BIBTEX ),
456- getBoolean (AUTOLINK_FILES_ENABLED ),
457- EntryEditorPreferences .JournalPopupEnabled .fromString (get (JOURNAL_POPUP )),
458- getBoolean (SHOW_SCITE_TAB ),
459- getBoolean (SHOW_USER_COMMENTS_FIELDS ),
460- getDouble (ENTRY_EDITOR_PREVIEW_DIVIDER_POS ));
443+ entryEditorPreferences = getEntryEditorPreferencesFromBackingStore (EntryEditorPreferences .getDefault ());
461444
462445 EasyBind .listen (entryEditorPreferences .entryEditorTabs (), (_ , _ , newValue ) -> storeEntryEditorTabs (newValue ));
463446 // defaultEntryEditorTabs are read-only
@@ -478,6 +461,26 @@ public EntryEditorPreferences getEntryEditorPreferences() {
478461 return entryEditorPreferences ;
479462 }
480463
464+ public EntryEditorPreferences getEntryEditorPreferencesFromBackingStore (EntryEditorPreferences defaults ) {
465+ return new EntryEditorPreferences (
466+ getEntryEditorTabs (),
467+ getDefaultEntryEditorTabs (),
468+ getBoolean (AUTO_OPEN_FORM ),
469+ getBoolean (SHOW_RECOMMENDATIONS ),
470+ getBoolean (SHOW_AI_SUMMARY ),
471+ getBoolean (SHOW_AI_CHAT ),
472+ getBoolean (SHOW_LATEX_CITATIONS ),
473+ getBoolean (SMART_FILE_ANNOTATIONS ),
474+ getBoolean (DEFAULT_SHOW_SOURCE ),
475+ getBoolean (VALIDATE_IN_ENTRY_EDITOR ),
476+ getBoolean (ALLOW_INTEGER_EDITION_BIBTEX ),
477+ getBoolean (AUTOLINK_FILES_ENABLED ),
478+ EntryEditorPreferences .JournalPopupEnabled .fromString (get (JOURNAL_POPUP , defaults .getJournalPopUp ())),
479+ getBoolean (SHOW_SCITE_TAB ),
480+ getBoolean (SHOW_USER_COMMENTS_FIELDS ),
481+ getDouble (ENTRY_EDITOR_PREVIEW_DIVIDER_POS , defaults .getPreviewDividerPos ()));
482+ }
483+
481484 /**
482485 * Get a Map of defined tab names to default tab fields.
483486 *
0 commit comments