From 03f6205524b12cb96c6b84038cd865041eed109c Mon Sep 17 00:00:00 2001 From: "r.kuznetsov" Date: Wed, 26 Aug 2015 14:03:28 +0300 Subject: [PATCH] Review fixes --- render/route_renderer.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/render/route_renderer.cpp b/render/route_renderer.cpp index 66ef6d0bd2..585bbaf37e 100644 --- a/render/route_renderer.cpp +++ b/render/route_renderer.cpp @@ -102,7 +102,7 @@ void MergeAndClipBorders(vector & borders) } // merge groups - int lastGroup = 0; + int lastGroup = borders[0].m_groupIndex; size_t lastGroupIndex = 0; for (size_t i = 1; i < borders.size(); i++) { @@ -314,6 +314,8 @@ void RouteRenderer::ConstructRoute(graphics::Screen * dlScreen) dlScreen->drawSymbol(m_endOfRoutePoint, "route_to", graphics::EPosCenter, 0); dlScreen->setDisplayList(nullptr); + + m_waitForConstruction = false; } void RouteRenderer::ClearRouteGraphics(graphics::Screen * dlScreen) @@ -334,11 +336,14 @@ void RouteRenderer::ClearRouteGraphics(graphics::Screen * dlScreen) m_arrowBorders.clear(); m_routeSegments.clear(); m_arrowBuffer.Clear(); + + m_needClearGraphics = false; } void RouteRenderer::ClearRouteData() { m_routeData.Clear(); + m_needClearData = false; } void RouteRenderer::PrepareToShutdown() @@ -395,23 +400,14 @@ void RouteRenderer::Render(graphics::Screen * dlScreen, ScreenBase const & scree { // clearing if (m_needClearData) - { ClearRouteData(); - m_needClearData = false; - } if (m_needClearGraphics) - { ClearRouteGraphics(dlScreen); - m_needClearGraphics = false; - } // construction if (m_waitForConstruction) - { ConstructRoute(dlScreen); - m_waitForConstruction = false; - } if (m_routeGraphics.empty()) return;