diff --git a/CHANGELOG.md b/CHANGELOG.md index b24f8d7f46f..4f9cbdc129c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve - We fixed an issue where the exception that there are invalid characters in filename. [#8786](https://github.com/JabRef/jabref/issues/8786) - When the proxy configuration removed the proxy user/password, this change is applied immediately. - We fixed an issue where removing several groups deletes only one of them. [#8390](https://github.com/JabRef/jabref/issues/8390) +- We fixed an issue where the Sidepane(groups, web search and open office) width is not remembered after restarting JabRef. [#8907](https://github.com/JabRef/jabref/issues/8907) - We fixed a bug where switching between themes will cause an error/exception. [#8939](https://github.com/JabRef/jabref/pull/8939) ### Removed diff --git a/src/main/java/org/jabref/gui/JabRefFrame.java b/src/main/java/org/jabref/gui/JabRefFrame.java index 2bbbf8f4412..91d074e7e7c 100644 --- a/src/main/java/org/jabref/gui/JabRefFrame.java +++ b/src/main/java/org/jabref/gui/JabRefFrame.java @@ -448,8 +448,10 @@ private void initLayout() { @Override public void invalidated(Observable observable) { if (mainStage.isShowing()) { - setDividerPosition(); - observable.removeListener(this); + Platform.runLater(() -> { + setDividerPosition(); + observable.removeListener(this); + }); } } }); @@ -472,10 +474,9 @@ private void updateSidePane() { } private void setDividerPosition() { - splitPane.setDividerPositions(prefs.getGuiPreferences().getSidePaneWidth()); if (mainStage.isShowing() && !sidePane.getChildren().isEmpty()) { - dividerSubscription = EasyBind.subscribe(splitPane.getDividers().get(0).positionProperty(), - position -> prefs.getGuiPreferences().setSidePaneWidth(position.doubleValue())); + splitPane.setDividerPositions(prefs.getGuiPreferences().getSidePaneWidth() / splitPane.getWidth()); + dividerSubscription = EasyBind.subscribe(sidePane.widthProperty(), width -> prefs.getGuiPreferences().setSidePaneWidth(width.doubleValue())); } }