-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix visual snap of side pane on startup #15553
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
Changes from 6 commits
06cb696
7ed4ea5
0c02a92
663738a
bf22cc6
ace702f
f832809
e9e5b5c
5d55b54
b75e056
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -284,8 +284,12 @@ private void updateSidePane() { | |
| horizontalSplit.getItems().remove(sidePane); | ||
| } else { | ||
| if (!horizontalSplit.getItems().contains(sidePane)) { | ||
| horizontalSplit.setVisible(false); | ||
| horizontalSplit.getItems().addFirst(sidePane); | ||
| updateHorizontalDividerPosition(); | ||
| Platform.runLater(() -> { | ||
| updateHorizontalDividerPosition(); | ||
| horizontalSplit.setVisible(true); | ||
| }); | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -407,6 +411,12 @@ private void initKeyBindings() { | |
| private void initBindings() { | ||
| BindingsHelper.bindContentFiltered(tabbedPane.getTabs(), stateManager.getOpenDatabases(), LibraryTab.class::isInstance); | ||
|
|
||
| mainStage.showingProperty().addListener((obs, wasShowing, isShowing) -> { | ||
| if (isShowing) { | ||
| updateHorizontalDividerPosition(); | ||
| } | ||
| }); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2. Leaked divider subscriptions initBindings() adds a mainStage.showingProperty listener that calls updateHorizontalDividerPosition(), but JabRefGUI.onShowing() already calls it; because updateHorizontalDividerPosition() overwrites horizontalDividerSubscription without unsubscribing the previous subscription, repeated window show cycles will leak listeners and duplicate preference updates. Agent Prompt
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pgrigolli needs to be addressed
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey, turns out it was just dead code that I forgot to remove from one try to another. Removed on the last commit! |
||
|
|
||
| // the binding for stateManager.activeDatabaseProperty() is at org.jabref.gui.LibraryTab.onDatabaseLoadingSucceed | ||
|
|
||
| // Subscribe to the search | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.