Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/map
diff options
context:
space:
mode:
authorArsentiy Milchakov <milcars@mapswithme.com>2018-08-22 14:12:08 +0300
committermpimenov <mpimenov@users.noreply.github.com>2018-08-22 16:48:46 +0300
commit88d400f2296a4b1a0ec8adb9d505167ca78940a8 (patch)
treeca968628c160195479d1ace61356bcec29c675e1 /map
parent92824ab302b88fa6dbff89d49252c2cfe484b6ee (diff)
[editor] synchronization. review fixes.
Diffstat (limited to 'map')
-rw-r--r--map/framework.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/map/framework.cpp b/map/framework.cpp
index e3e177b837..e736dce18c 100644
--- a/map/framework.cpp
+++ b/map/framework.cpp
@@ -392,7 +392,9 @@ Framework::Framework(FrameworkParams const & params)
{
m_startBackgroundTime = my::Timer::LocalTime();
- // Editor should be initialized before search to use correct thread for write operations.
+ // Editor should be initialized from the main thread to set its ThreadChecker.
+ // However, search calls editor upon initialization thus setting the lazy editor's ThreadChecker
+ // to a wrong thread. So editor should be initialiazed before serach.
osm::Editor & editor = osm::Editor::Instance();
// Restore map style before classificator loading
@@ -3025,7 +3027,7 @@ osm::Editor::SaveResult Framework::SaveEditedMapObject(osm::EditableMapObject em
if (!isCreatedFeature)
{
if (!g.GetOriginalFeatureByIndex(emo.GetID().m_index, originalFeature))
- return osm::Editor::NoUnderlyingMapError;
+ return osm::Editor::SaveResult::NoUnderlyingMapError;
}
else
{