-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix NPE when saving preferences #11509
Conversation
@@ -386,6 +384,9 @@ public void setCurrentlyEditedEntry(BibEntry currentlyEditedEntry) { | |||
getSelectedTab().notifyAboutFocus(currentlyEditedEntry); | |||
}); | |||
|
|||
EasyBind.listen(preferencesService.getPreviewPreferences().showPreviewAsExtraTabProperty(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should check if this decreases performance and increase memory consumption -- IMHO the old binding should be removed. I don't know if this possible (or if this is an issue at all...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I missed that the binding will be added every time. One solution is to revert this commit and check if currentlyEditedEntry
is not null in adaptVisibleTabs()
. Or, keep this commit but add a new boolean to track if the binding is registered or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I missed that the binding will be added every time. One solution is to revert this commit and check if
currentlyEditedEntry
is not null inadaptVisibleTabs()
. Or, keep this commit but add a new boolean to track if the binding is registered or not.
I was hoping for another way. Also to apply for the other binding creations in the same method.
This reverts commit ea00fe6.
* upstream/main: Fix NPE when saving preferences (JabRef#11509) Switch to stream-based loading (JabRef#11479) Save unlinked local files dialog prefs (JabRef#11493) Add minimal support for biblatex data annotations (JabRef#11506) Fix handling of relative-file storage and auto linking (JabRef#11492) New Crowdin updates (JabRef#11504) Add missing issue numbers CSL4LibreOffice - A [GSoC '24] (JabRef#11477) Bump src/main/resources/csl-styles from `b2be5ae` to `fd6cb3e` (JabRef#11501) Bump gittools/actions from 1.1.1 to 1.2.0 (JabRef#11500) Bump com.kohlschutter.junixsocket:junixsocket-core from 2.9.1 to 2.10.0 (JabRef#11498) Bump commons-logging:commons-logging from 1.3.2 to 1.3.3 (JabRef#11499) Bump org.jsoup:jsoup from 1.17.2 to 1.18.1 (JabRef#11497) Bump com.kohlschutter.junixsocket:junixsocket-mysql from 2.9.1 to 2.10.0 (JabRef#11496) Bump org.openrewrite.recipe:rewrite-recipe-bom from 2.14.0 to 2.15.0 (JabRef#11495) FAQ updates (JabRef#11486) Update Gradle Wrapper from 8.8 to 8.9. Fix Chocolate.bib (JabRef#11491) # Conflicts: # src/main/java/org/jabref/gui/openoffice/OOBibBase.java # src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java # src/main/java/org/jabref/gui/openoffice/StyleSelectDialogView.java # src/main/java/org/jabref/gui/openoffice/StyleSelectDialogViewModel.java # src/main/java/org/jabref/preferences/JabRefPreferences.java
Follow-up to #11379.
An exception was thrown after changing "show preview as a tab" in the preferences.
Exception
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)