diff --git a/scwx-qt/source/scwx/qt/settings/general_settings.cpp b/scwx-qt/source/scwx/qt/settings/general_settings.cpp index 997d4e06..0eab43e9 100644 --- a/scwx-qt/source/scwx/qt/settings/general_settings.cpp +++ b/scwx-qt/source/scwx/qt/settings/general_settings.cpp @@ -42,6 +42,7 @@ public: mapProvider_.SetDefault(defaultMapProviderValue); mapboxApiKey_.SetDefault("?"); maptilerApiKey_.SetDefault("?"); + trackLocation_.SetDefault(false); updateNotificationsEnabled_.SetDefault(true); fontSizes_.SetElementMinimum(1); @@ -118,6 +119,7 @@ public: SettingsVariable mapProvider_ {"map_provider"}; SettingsVariable mapboxApiKey_ {"mapbox_api_key"}; SettingsVariable maptilerApiKey_ {"maptiler_api_key"}; + SettingsVariable trackLocation_ {"track_location"}; SettingsVariable updateNotificationsEnabled_ {"update_notifications"}; }; @@ -137,6 +139,7 @@ GeneralSettings::GeneralSettings() : &p->mapProvider_, &p->mapboxApiKey_, &p->maptilerApiKey_, + &p->trackLocation_, &p->updateNotificationsEnabled_}); SetDefaults(); } @@ -212,6 +215,11 @@ SettingsVariable& GeneralSettings::maptiler_api_key() const return p->maptilerApiKey_; } +SettingsVariable& GeneralSettings::track_location() const +{ + return p->trackLocation_; +} + SettingsVariable& GeneralSettings::update_notifications_enabled() const { return p->updateNotificationsEnabled_; @@ -225,6 +233,7 @@ bool GeneralSettings::Shutdown() dataChanged |= p->loopDelay_.Commit(); dataChanged |= p->loopSpeed_.Commit(); dataChanged |= p->loopTime_.Commit(); + dataChanged |= p->trackLocation_.Commit(); return dataChanged; } @@ -250,6 +259,7 @@ bool operator==(const GeneralSettings& lhs, const GeneralSettings& rhs) lhs.p->mapProvider_ == rhs.p->mapProvider_ && lhs.p->mapboxApiKey_ == rhs.p->mapboxApiKey_ && lhs.p->maptilerApiKey_ == rhs.p->maptilerApiKey_ && + lhs.p->trackLocation_ == rhs.p->trackLocation_ && lhs.p->updateNotificationsEnabled_ == rhs.p->updateNotificationsEnabled_); } diff --git a/scwx-qt/source/scwx/qt/settings/general_settings.hpp b/scwx-qt/source/scwx/qt/settings/general_settings.hpp index 57045ac6..9c6256b7 100644 --- a/scwx-qt/source/scwx/qt/settings/general_settings.hpp +++ b/scwx-qt/source/scwx/qt/settings/general_settings.hpp @@ -38,6 +38,7 @@ public: SettingsVariable& map_provider() const; SettingsVariable& mapbox_api_key() const; SettingsVariable& maptiler_api_key() const; + SettingsVariable& track_location() const; SettingsVariable& update_notifications_enabled() const; static GeneralSettings& Instance(); diff --git a/test/data b/test/data index fc428fa1..49a5bf59 160000 --- a/test/data +++ b/test/data @@ -1 +1 @@ -Subproject commit fc428fa1460b3d5ce04646727e379e2f4f90f5ec +Subproject commit 49a5bf59c30822b585b5726d7262b8e4ed4f10a7