diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2017-07-25 15:27:11 +0300 |
---|---|---|
committer | Ilya Grechuhin <i.grechuhin@gmail.com> | 2017-07-28 10:31:35 +0300 |
commit | 12fd92ce75aa64ef5b9ef03ef178374c84c2b8ad (patch) | |
tree | ba8db5d51a6cc634c2aa6698b53d4df54638d017 /qt | |
parent | 8c2a1cb00f385094474117aa564fdbfeba84880f (diff) |
Added route points persistence storing and loading
Diffstat (limited to 'qt')
-rw-r--r-- | qt/draw_widget.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/qt/draw_widget.cpp b/qt/draw_widget.cpp index 24b405e954..467cab3638 100644 --- a/qt/draw_widget.cpp +++ b/qt/draw_widget.cpp @@ -7,8 +7,6 @@ #include "map/framework.hpp" -#include "drape_frontend/visual_params.hpp" - #include "search/result.hpp" #include "storage/index.hpp" @@ -114,6 +112,8 @@ void DrawWidget::PrepareShutdown() auto & routingManager = m_framework.GetRoutingManager(); if (routingManager.IsRoutingActive() && routingManager.IsRoutingFollowing()) { + routingManager.SaveRoutePoints(); + auto style = m_framework.GetMapStyle(); if (style == MapStyle::MapStyleVehicleClear) m_framework.MarkMapStyle(MapStyle::MapStyleClear); @@ -150,6 +150,10 @@ void DrawWidget::initializeGL() { MapWidget::initializeGL(); m_framework.LoadBookmarks(); + + auto & routingManager = m_framework.GetRoutingManager(); + if (routingManager.LoadRoutePoints()) + routingManager.BuildRoute(0 /* timeoutSec */); } void DrawWidget::mousePressEvent(QMouseEvent * e) |