]> sigrok.org Git - pulseview.git/blobdiff - pv/globalsettings.cpp
Auto-load session setups if they exist and auto-save them if desired
[pulseview.git] / pv / globalsettings.cpp
index 34dbc8326e8acb0f5db01d4c195764af310c73ab..19ce0cd79104cce58878f1ee194fd4ac452f1736 100644 (file)
@@ -44,6 +44,7 @@ const vector< pair<QString, QString> > Themes {
 
 const QString GlobalSettings::Key_General_Theme = "General_Theme";
 const QString GlobalSettings::Key_General_Style = "General_Style";
+const QString GlobalSettings::Key_General_SaveWithSetup = "General_SaveWithSetup";
 const QString GlobalSettings::Key_View_ZoomToFitDuringAcq = "View_ZoomToFitDuringAcq";
 const QString GlobalSettings::Key_View_ZoomToFitAfterAcq = "View_ZoomToFitAfterAcq";
 const QString GlobalSettings::Key_View_TriggerIsZeroTime = "View_TriggerIsZeroTime";
@@ -94,6 +95,10 @@ void GlobalSettings::set_defaults_where_needed()
        if (!contains(Key_General_Style))
                setValue(Key_General_Style, "");
 
+       // Save setup with .sr files by default
+       if (!contains(Key_General_SaveWithSetup))
+               setValue(Key_General_SaveWithSetup, true);
+
        // Enable zoom-to-fit after acquisition by default
        if (!contains(Key_View_ZoomToFitAfterAcq))
                setValue(Key_View_ZoomToFitAfterAcq, true);