]> sigrok.org Git - pulseview.git/commitdiff
View: Save/restore splitter state
authorSoeren Apel <redacted>
Thu, 1 Jun 2017 19:51:34 +0000 (21:51 +0200)
committerUwe Hermann <redacted>
Fri, 2 Jun 2017 11:37:02 +0000 (13:37 +0200)
pv/view/view.cpp

index 6c3f896cfd9ff94f77cdc9c5a992af281514f969..f3afd937795104d18768ca65089091819a5e351e 100644 (file)
@@ -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> signal : signals_) {
                settings.beginGroup(signal->base()->internal_name());
                signal->restore_settings(settings);