diff --git a/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/views/panes/SecurityPriceChartPane.java b/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/views/panes/SecurityPriceChartPane.java index 1dfdfb29e9..89f0e35f29 100644 --- a/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/views/panes/SecurityPriceChartPane.java +++ b/name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/views/panes/SecurityPriceChartPane.java @@ -78,7 +78,14 @@ public Control createViewControl(Composite parent) stylingEngine.style(chart); details = new SecurityDetailsViewer(sash, SWT.NONE, client, true); - details.getControl().setLayoutData(new SashLayoutData(SWTHelper.getPackedWidth(details.getControl()))); + + final String sashIdentifier = getClass().getSimpleName() + "-newsash"; //$NON-NLS-1$ + int size = preferences.getInt(sashIdentifier); + if (size == 0) + size = SWTHelper.getPackedWidth(details.getControl()); + details.getControl().setLayoutData(new SashLayoutData(size)); + sash.addDisposeListener(e -> preferences.setValue(sashIdentifier, + ((SashLayoutData) details.getControl().getLayoutData()).getSize())); return sash; }