diff --git a/CHANGELOG.md b/CHANGELOG.md index d4d193ddab3..41bef1f6584 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv ### Fixed - We fixed an issue where the 'Check for updates' preference was not saved. [#11485](https://github.com/JabRef/jabref/pull/11485) -- We fixed an issue where an exception was thrown after changing "show preview as a tab" in the preferences. [#11509](https://github.com/JabRef/jabref/pull/11509) +- We fixed an issue where an exception was thrown after changing "show preview as a tab" in the preferences. [#11515](https://github.com/JabRef/jabref/pull/11515) ### Removed diff --git a/src/main/java/org/jabref/gui/entryeditor/EntryEditor.java b/src/main/java/org/jabref/gui/entryeditor/EntryEditor.java index 5d39ab56ffe..5d758895069 100644 --- a/src/main/java/org/jabref/gui/entryeditor/EntryEditor.java +++ b/src/main/java/org/jabref/gui/entryeditor/EntryEditor.java @@ -147,6 +147,12 @@ public EntryEditor(LibraryTab libraryTab, UndoAction undoAction, RedoAction redo activeTab.notifyAboutFocus(currentlyEditedEntry); } }); + EasyBind.listen(preferencesService.getPreviewPreferences().showPreviewAsExtraTabProperty(), + (obs, oldValue, newValue) -> { + if (currentlyEditedEntry != null) { + adaptVisibleTabs(); + } + }); } private void setupDragAndDrop(LibraryTab libraryTab) { @@ -384,9 +390,6 @@ public void setCurrentlyEditedEntry(BibEntry currentlyEditedEntry) { getSelectedTab().notifyAboutFocus(currentlyEditedEntry); }); - EasyBind.listen(preferencesService.getPreviewPreferences().showPreviewAsExtraTabProperty(), - (obs, oldValue, newValue) -> adaptVisibleTabs()); - adaptVisibleTabs(); setupToolBar();