forked from organicmaps/organicmaps
Fixed data race with bookmarks in InsertRoute.
This commit is contained in:
parent
0f02fd5fa0
commit
1bba16a3e1
2 changed files with 9 additions and 2 deletions
|
@ -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 */);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue