Skip to content

Commit 9ab537f

Browse files
Ka0o0tobiasdiez
authored andcommitted
Fix #5615 side pane not remembering position (#5629)
1 parent eb06344 commit 9ab537f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
6262
- We fixed an issue where the merge dialog showed the wrong text colour in "Dark" mode [#5516](https://github.com/JabRef/jabref/issues/5516)
6363
- We fixed an issue where the author field was not correctly parsed during bibtex key-generation. [#5551](https://github.com/JabRef/jabref/issues/5551)
6464
- We fixed an issue where notifications where shown during autosave. [#5555](https://github.com/JabRef/jabref/issues/5555)
65+
- We fixed an issue where the side pane was not remembering its position. [#5615](https://github.com/JabRef/jabref/issues/5615)
6566

6667
### Removed
6768

src/main/java/org/jabref/gui/JabRefFrame.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,6 @@ private void initLayout() {
410410
head.setCenter(createToolbar());
411411
setTop(head);
412412

413-
SplitPane.setResizableWithParent(sidePane, Boolean.FALSE);
414413
splitPane.getItems().addAll(sidePane, tabbedPane);
415414

416415
// We need to wait with setting the divider since it gets reset a few times during the initial set-up
@@ -423,6 +422,8 @@ public void changed(ObservableValue<? extends Boolean> observable, Boolean oldVa
423422

424423
EasyBind.subscribe(sidePane.visibleProperty(), visible -> {
425424
if (visible) {
425+
// Run SplitPane.setResizableWithParent later to avoid miscalculation during initial layouting
426+
Platform.runLater(() -> SplitPane.setResizableWithParent(sidePane, Boolean.FALSE));
426427
if (!splitPane.getItems().contains(sidePane)) {
427428
splitPane.getItems().add(0, sidePane);
428429
setDividerPosition();

0 commit comments

Comments
 (0)