From ce0c280363f1dcbf65dca9f86a2540a7a1a574c0 Mon Sep 17 00:00:00 2001 From: asl Date: Wed, 27 Sep 2017 17:51:27 +0300 Subject: [PATCH] refs #1332: state of splitter is stored/restored --- src/HYDROGUI/HYDROGUI_ProfileDlg.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/HYDROGUI/HYDROGUI_ProfileDlg.cxx b/src/HYDROGUI/HYDROGUI_ProfileDlg.cxx index 5acc8fe1..5b724bbd 100644 --- a/src/HYDROGUI/HYDROGUI_ProfileDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_ProfileDlg.cxx @@ -41,6 +41,9 @@ #include #include #include +#include + +const QString splitter_key = "HYDROGUI_ProfileDlg::splitter"; HYDROGUI_ProfileDlg::HYDROGUI_ProfileDlg( HYDROGUI_Module* theModule, const QString& theTitle ) : HYDROGUI_ViewerDlg( theModule, theTitle, true ), @@ -86,10 +89,15 @@ HYDROGUI_ProfileDlg::HYDROGUI_ProfileDlg( HYDROGUI_Module* theModule, const QStr sizes.append( 200 ); sizes.append( 25 ); splitter()->setSizes( sizes ); + + QSettings settings; + splitter()->restoreState( settings.value( splitter_key ).toByteArray() ); } HYDROGUI_ProfileDlg::~HYDROGUI_ProfileDlg() { + QSettings settings; + settings.setValue( splitter_key, splitter()->saveState() ); } void HYDROGUI_ProfileDlg::reset() -- 2.39.2