diff options
author | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2016-08-05 15:40:28 +0300 |
---|---|---|
committer | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-08-18 17:06:28 +0300 |
commit | ae0185f13e1d558bf12f27d5171a626421cc9ee2 (patch) | |
tree | 6dee558877b979d46672c42cc94015b914ecbcd2 /drape_frontend | |
parent | e1c0ae74e88b95a0ba21b247b08f4dd2a200af4c (diff) |
Autozoom initialization after drape engine reinitialization.
Diffstat (limited to 'drape_frontend')
-rw-r--r-- | drape_frontend/drape_engine.cpp | 3 | ||||
-rw-r--r-- | drape_frontend/drape_engine.hpp | 5 | ||||
-rwxr-xr-x | drape_frontend/frontend_renderer.cpp | 3 | ||||
-rwxr-xr-x | drape_frontend/frontend_renderer.hpp | 5 | ||||
-rw-r--r-- | drape_frontend/my_position_controller.cpp | 4 | ||||
-rw-r--r-- | drape_frontend/my_position_controller.hpp | 2 |
6 files changed, 15 insertions, 7 deletions
diff --git a/drape_frontend/drape_engine.cpp b/drape_frontend/drape_engine.cpp index f5896c1a84..c3d8847e9b 100644 --- a/drape_frontend/drape_engine.cpp +++ b/drape_frontend/drape_engine.cpp @@ -54,7 +54,8 @@ DrapeEngine::DrapeEngine(Params && params) bind(&DrapeEngine::MyPositionModeChanged, this, _1, _2), mode, make_ref(m_requestedTiles), timeInBackground, params.m_allow3dBuildings, params.m_blockTapEvents, - params.m_isFirstLaunch, params.m_isRoutingActive); + params.m_isFirstLaunch, params.m_isRoutingActive, + params.m_isAutozoomEnabled); m_frontend = make_unique_dp<FrontendRenderer>(frParams); diff --git a/drape_frontend/drape_engine.hpp b/drape_frontend/drape_engine.hpp index 9e9271a21e..eede48e993 100644 --- a/drape_frontend/drape_engine.hpp +++ b/drape_frontend/drape_engine.hpp @@ -47,7 +47,8 @@ public: bool showChoosePositionMark, vector<m2::TriangleD> && boundAreaTriangles, bool firstLaunch, - bool isRoutingActive) + bool isRoutingActive, + bool isAutozoomEnabled) : m_factory(factory) , m_stringsBundle(stringBundle) , m_viewport(viewport) @@ -61,6 +62,7 @@ public: , m_boundAreaTriangles(move(boundAreaTriangles)) , m_isFirstLaunch(firstLaunch) , m_isRoutingActive(isRoutingActive) + , m_isAutozoomEnabled(isAutozoomEnabled) {} ref_ptr<dp::OGLContextFactory> m_factory; @@ -76,6 +78,7 @@ public: vector<m2::TriangleD> m_boundAreaTriangles; bool m_isFirstLaunch; bool m_isRoutingActive; + bool m_isAutozoomEnabled; }; DrapeEngine(Params && params); diff --git a/drape_frontend/frontend_renderer.cpp b/drape_frontend/frontend_renderer.cpp index 7facf8a204..014a26e1e1 100755 --- a/drape_frontend/frontend_renderer.cpp +++ b/drape_frontend/frontend_renderer.cpp @@ -143,7 +143,8 @@ FrontendRenderer::FrontendRenderer(Params const & params) ASSERT(m_userPositionChangedFn, ()); m_myPositionController.reset(new MyPositionController(params.m_initMyPositionMode, params.m_timeInBackground, - params.m_firstLaunch, params.m_isRoutingActive)); + params.m_firstLaunch, params.m_isRoutingActive, + params.m_isAutozoomEnabled)); m_myPositionController->SetModeListener(params.m_myPositionModeCallback); StartThread(); diff --git a/drape_frontend/frontend_renderer.hpp b/drape_frontend/frontend_renderer.hpp index 0f08559bc2..1117f31f8c 100755 --- a/drape_frontend/frontend_renderer.hpp +++ b/drape_frontend/frontend_renderer.hpp @@ -85,7 +85,8 @@ public: bool allow3dBuildings, bool blockTapEvents, bool firstLaunch, - bool isRoutingActive) + bool isRoutingActive, + bool isAutozoomEnabled) : BaseRenderer::Params(commutator, factory, texMng) , m_viewport(viewport) , m_modelViewChangedFn(modelViewChangedFn) @@ -99,6 +100,7 @@ public: , m_blockTapEvents(blockTapEvents) , m_firstLaunch(firstLaunch) , m_isRoutingActive(isRoutingActive) + , m_isAutozoomEnabled(isAutozoomEnabled) {} Viewport m_viewport; @@ -113,6 +115,7 @@ public: bool m_blockTapEvents; bool m_firstLaunch; bool m_isRoutingActive; + bool m_isAutozoomEnabled; }; FrontendRenderer(Params const & params); diff --git a/drape_frontend/my_position_controller.cpp b/drape_frontend/my_position_controller.cpp index 27262fbfbc..5130a4a043 100644 --- a/drape_frontend/my_position_controller.cpp +++ b/drape_frontend/my_position_controller.cpp @@ -123,7 +123,7 @@ double CalculateZoomBySpeed(double speed, bool isPerspectiveAllowed) } // namespace MyPositionController::MyPositionController(location::EMyPositionMode initMode, double timeInBackground, - bool isFirstLaunch, bool isRoutingActive) + bool isFirstLaunch, bool isRoutingActive, bool isAutozoomEnabled) : m_mode(location::PendingPosition) , m_desiredInitMode(initMode) , m_isFirstLaunch(isFirstLaunch) @@ -136,7 +136,7 @@ MyPositionController::MyPositionController(location::EMyPositionMode initMode, d , m_oldPosition(m2::PointD::Zero()) , m_oldDrawDirection(0.0) , m_enablePerspectiveInRouting(false) - , m_enableAutoZoomInRouting(false) + , m_enableAutoZoomInRouting(isAutozoomEnabled) , m_autoScale2d(GetScale(kDefaultAutoZoom)) , m_autoScale3d(m_autoScale2d) , m_lastGPSBearing(false) diff --git a/drape_frontend/my_position_controller.hpp b/drape_frontend/my_position_controller.hpp index 15d9c5e60e..64350ae3e3 100644 --- a/drape_frontend/my_position_controller.hpp +++ b/drape_frontend/my_position_controller.hpp @@ -39,7 +39,7 @@ public: }; MyPositionController(location::EMyPositionMode initMode, double timeInBackground, - bool isFirstLaunch, bool isRoutingActive); + bool isFirstLaunch, bool isRoutingActive, bool isAutozoomEnabled); ~MyPositionController(); void OnNewViewportRect(); |