Skip to content

Commit

Permalink
separate persisted state key for expanded state
Browse files Browse the repository at this point in the history
in collapsiple parts (rendered as TitledPane)
  • Loading branch information
martinbluehweis committed Feb 9, 2022
1 parent 3b7f434 commit 1f949a9
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -271,10 +271,10 @@ protected void layoutChildren() {
content.setStyle("-fx-padding: 0px;"); //$NON-NLS-1$
this.titledPane = new TitledPane("",content); //$NON-NLS-1$
this.titledPane.expandedProperty().addListener((ob,ol,ne) -> {
this.domElement.getPersistedState().put("efxSashFixed", !ne+""); //$NON-NLS-1$ //$NON-NLS-2$
this.domElement.getPersistedState().put("efxCollapsed", !ne+""); //$NON-NLS-1$ //$NON-NLS-2$
});

if( Boolean.parseBoolean(this.domElement.getPersistedState().getOrDefault("efxSashFixed","false")) ) { //$NON-NLS-1$ //$NON-NLS-2$
if( Boolean.parseBoolean(this.domElement.getPersistedState().getOrDefault("efxCollapsed","false")) ) { //$NON-NLS-1$ //$NON-NLS-2$
this.titledPane.setExpanded(false);
}
this.titledPane.getStyleClass().add("efx-expandable-title-pane"); //$NON-NLS-1$
Expand Down

0 comments on commit 1f949a9

Please sign in to comment.