From 12fd92ce75aa64ef5b9ef03ef178374c84c2b8ad Mon Sep 17 00:00:00 2001 From: "r.kuznetsov" Date: Tue, 25 Jul 2017 15:27:11 +0300 Subject: Added route points persistence storing and loading --- qt/draw_widget.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'qt') 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) -- cgit v1.2.3