From: Soeren Apel Date: Thu, 1 Jun 2017 19:51:34 +0000 (+0200) Subject: View: Save/restore splitter state X-Git-Tag: pulseview-0.4.0~47 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=37849039c0a75b20f198292979e843267d29ea7e;p=pulseview.git View: Save/restore splitter state --- diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 6c3f896c..f3afd937 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -300,6 +300,8 @@ void View::save_settings(QSettings &settings) const settings.setValue("v_offset", scrollarea_->verticalScrollBar()->sliderPosition()); + settings.setValue("splitter_state", splitter_->saveState()); + stringstream ss; boost::archive::text_oarchive oa(ss); oa << boost::serialization::make_nvp("offset", offset_); @@ -331,6 +333,9 @@ void View::restore_settings(QSettings &settings) set_offset(offset); } + if (settings.contains("splitter_state")) + splitter_->restoreState(settings.value("splitter_state").toByteArray()); + for (shared_ptr signal : signals_) { settings.beginGroup(signal->base()->internal_name()); signal->restore_settings(settings);