X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fglobalsettings.cpp;h=0a41f31d722315406b2efe1e7170ae9b24769059;hp=0eff1915d15ed5d151b4d1eb364d40247231c532;hb=df842d4f2144712d075c91a3b073cdc923bca943;hpb=1cc1c8dec120ed6d98071f939ea435d85ee853bf diff --git a/pv/globalsettings.cpp b/pv/globalsettings.cpp index 0eff1915..0a41f31d 100644 --- a/pv/globalsettings.cpp +++ b/pv/globalsettings.cpp @@ -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 cb) {