]> sigrok.org Git - pulseview.git/blobdiff - pv/globalsettings.cpp
Settings: Add method to set settings defaults
[pulseview.git] / pv / globalsettings.cpp
index 0eff1915d15ed5d151b4d1eb364d40247231c532..ee9741030c1098ee8d6c5352dfef6feccfa5fbdf 100644 (file)
@@ -42,6 +42,13 @@ 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);
+}
+
 void GlobalSettings::register_change_handler(const QString key,
        function<void(QVariant)> cb)
 {