Fixed data race with bookmarks in InsertRoute.

This commit is contained in:
Daria Volvenkova 2018-03-02 14:53:26 +03:00 committed by Aleksandr Zatsepin
parent 0f02fd5fa0
commit 1bba16a3e1
2 changed files with 9 additions and 2 deletions

View file

@ -407,7 +407,11 @@ void RoutingManager::SetRouterImpl(RouterType type)
void RoutingManager::RemoveRoute(bool deactivateFollowing)
{
m_bmManager->GetEditSession().ClearGroup(UserMark::Type::TRANSIT);
GetPlatform().RunTask(Platform::Thread::Gui, [this]()
{
m_bmManager->GetEditSession().ClearGroup(UserMark::Type::TRANSIT);
});
if (deactivateFollowing)
SetPointsFollowingMode(false /* enabled */);

View file

@ -402,7 +402,10 @@ void TransitRouteDisplay::ProcessSubroute(vector<RouteSegment> const & segments,
m_routeInfo.m_totalDistInMeters = prevDistance;
m_routeInfo.m_totalTimeInSec = static_cast<int>(ceil(prevTime));
CreateTransitMarks(transitMarks);
GetPlatform().RunTask(Platform::Thread::Gui, [this, transitMarks]()
{
CreateTransitMarks(transitMarks);
});
}
void TransitRouteDisplay::CollectTransitDisplayInfo(vector<RouteSegment> const & segments,