]> sigrok.org Git - pulseview.git/blobdiff - pv/globalsettings.cpp
GlobalSettings: Enable "show sampling points" by default
[pulseview.git] / pv / globalsettings.cpp
index 0eff1915d15ed5d151b4d1eb364d40247231c532..0a41f31d722315406b2efe1e7170ae9b24769059 100644 (file)
@@ -42,6 +42,17 @@ GlobalSettings::GlobalSettings() :
        beginGroup("Settings");
 }
 
+void GlobalSettings::set_defaults_where_needed()
+{
+       // Enable coloured trace backgrounds by default
+       if (!contains(Key_View_ColouredBG))
+               setValue(Key_View_ColouredBG, true);
+
+       // Enable showing sampling points by default
+       if (!contains(Key_View_ShowSamplingPoints))
+               setValue(Key_View_ShowSamplingPoints, true);
+}
+
 void GlobalSettings::register_change_handler(const QString key,
        function<void(QVariant)> cb)
 {