Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorExMix <rahuba.youri@mapswithme.com>2014-12-02 15:22:51 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:34:20 +0300
commit637776083a1cace35018bf2763d8bb0bab582353 (patch)
tree59011702f5938e19e57582766e8356e459c2e1cf /map/location_state.cpp
parent4029fafab496d9d4131dadab4bab3d4d527ee9f7 (diff)
[core] save location state mode into settings.ini
Diffstat (limited to 'map/location_state.cpp')
-rw-r--r--map/location_state.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/map/location_state.cpp b/map/location_state.cpp
index 133e820d57..9a96c44c2d 100644
--- a/map/location_state.cpp
+++ b/map/location_state.cpp
@@ -245,6 +245,8 @@ private:
int m_idleFrames = 0;
};
+string const LocationStateMode = "LastLocationStateMode";
+
}
State::Params::Params()
@@ -264,6 +266,11 @@ State::State(Params const & p)
{
m_locationAreaColor = p.m_locationAreaColor;
m_framework = p.m_framework;
+
+ int mode = 0;
+ if (Settings::Get(LocationStateMode, mode))
+ m_modeInfo = mode;
+
bool isBench = false;
if (Settings::Get("IsBenchmarking", isBench) && isBench)
m_modeInfo = UnknownPosition;
@@ -696,6 +703,7 @@ void State::SetModeInfo(uint16_t modeInfo)
m_modeInfo = modeInfo;
if (newMode != oldMode)
{
+ Settings::Set(LocationStateMode, static_cast<int>(GetMode()));
CallStateModeListeners();
AnimateStateTransition(oldMode, newMode);
invalidate();