From: asl Date: Wed, 27 Sep 2017 14:51:27 +0000 (+0300) Subject: refs #1332: state of splitter is stored/restored X-Git-Tag: v2.1~66^2~12^2~3^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ce0c280363f1dcbf65dca9f86a2540a7a1a574c0;p=modules%2Fhydro.git refs #1332: state of splitter is stored/restored --- 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()