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
path: root/map
diff options
context:
space:
mode:
authorDaria Volvenkova <d.volvenkova@corp.mail.ru>2018-08-17 18:42:11 +0300
committerRoman Kuznetsov <r.kuznetsow@gmail.com>2018-08-19 20:49:12 +0300
commit45a35edf6d26cadaeb6e48bf1cec9b3253503b25 (patch)
tree46e0d1a254a85be02002cf516a9556c33b8a0857 /map
parent515abeed2a658d13864d15c80463f53845738912 (diff)
Refactoring of DebugRectRenderer.
Diffstat (limited to 'map')
-rw-r--r--map/framework.cpp25
-rw-r--r--map/framework.hpp5
2 files changed, 19 insertions, 11 deletions
diff --git a/map/framework.cpp b/map/framework.cpp
index bf59ddf866..88f2788624 100644
--- a/map/framework.cpp
+++ b/map/framework.cpp
@@ -1897,6 +1897,12 @@ void Framework::SetRenderingDisabled(bool destroyContext)
m_drapeEngine->SetRenderingDisabled(destroyContext);
}
+void Framework::EnableDebugRectRendering(bool enabled)
+{
+ if (m_drapeEngine)
+ m_drapeEngine->EnableDebugRectRendering(enabled);
+}
+
void Framework::ConnectToGpsTracker()
{
m_connectToGpsTrack = true;
@@ -2595,11 +2601,6 @@ void Framework::SaveAutoZoom(bool allowAutoZoom)
settings::Set(kAllowAutoZoom, allowAutoZoom);
}
-void Framework::EnableTransitScheme(bool enable)
-{
- m_transitManager.EnableTransitSchemeMode(enable);
-}
-
bool Framework::LoadTransitSchemeEnabled()
{
bool enabled;
@@ -2732,12 +2733,12 @@ bool Framework::ParseDrapeDebugCommand(string const & query)
}
if (query == "?scheme")
{
- EnableTransitScheme(true /* enable */);
+ m_transitManager.EnableTransitSchemeMode(true /* enable */);
return true;
}
if (query == "?no-scheme")
{
- EnableTransitScheme(false /* enable */);
+ m_transitManager.EnableTransitSchemeMode(false /* enable */);
return true;
}
if (query == "?debug-info")
@@ -2750,6 +2751,16 @@ bool Framework::ParseDrapeDebugCommand(string const & query)
m_drapeEngine->ShowDebugInfo(false /* shown */);
return true;
}
+ if (query == "?debug-rect")
+ {
+ m_drapeEngine->EnableDebugRectRendering(true /* shown */);
+ return true;
+ }
+ if (query == "?no-debug-rect")
+ {
+ m_drapeEngine->EnableDebugRectRendering(false /* shown */);
+ return true;
+ }
return false;
}
diff --git a/map/framework.hpp b/map/framework.hpp
index 5faddb1d88..1e7c740cfe 100644
--- a/map/framework.hpp
+++ b/map/framework.hpp
@@ -383,6 +383,7 @@ public:
void ResetLastTapEvent();
void InvalidateRendering();
+ void EnableDebugRectRendering(bool enabled);
void EnableChoosePositionMode(bool enable, bool enableBounds, bool applyPosition, m2::PointD const & position);
void BlockTapEvents(bool block);
@@ -732,7 +733,6 @@ public:
//@}
public:
-
void AllowTransliteration(bool allowTranslit);
bool LoadTransliteration();
void SaveTransliteration(bool allowTranslit);
@@ -761,9 +761,6 @@ public:
bool LoadTrafficSimplifiedColors();
void SaveTrafficSimplifiedColors(bool simplified);
- // TODO: Enable transit scheme via transit manager.
- void EnableTransitScheme(bool enable);
-
bool LoadTransitSchemeEnabled();
void SaveTransitSchemeEnabled(bool enabled);