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
diff options
context:
space:
mode:
authorArsentiy Milchakov <a.milchakov@corp.mail.ru>2016-07-15 20:16:41 +0300
committerArsentiy Milchakov <a.milchakov@corp.mail.ru>2016-07-19 14:43:41 +0300
commitfe4ccf09c2c21d9b1499429f5531b765d9c928e2 (patch)
tree96aab836723ffd13cf44e4adf954c63a02513c26 /indexer/osm_editor.cpp
parent751e6ea7a91f0ba8e9248206a61721137504946c (diff)
Direct editing of default name is locked, editing of multilingual names is allowed, changes for android are included
Diffstat (limited to 'indexer/osm_editor.cpp')
-rw-r--r--indexer/osm_editor.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/indexer/osm_editor.cpp b/indexer/osm_editor.cpp
index b98f934c7c..6c9ac30912 100644
--- a/indexer/osm_editor.cpp
+++ b/indexer/osm_editor.cpp
@@ -426,6 +426,25 @@ bool Editor::IsCreatedFeature(FeatureID const & fid)
return fid.m_index >= kStartIndexForCreatedFeatures;
}
+bool Editor::WasDefaultNameSaved(FeatureID const & fid) const
+{
+ if (IsCreatedFeature(fid))
+ return false;
+
+ if (FeatureStatus::Created == GetFeatureStatus(fid))
+ return false;
+
+ auto const originalFeaturePtr = m_getOriginalFeatureFn(fid);
+ if (!originalFeaturePtr)
+ {
+ LOG(LERROR, ("A feature with id", fid, "cannot be loaded."));
+ alohalytics::LogEvent("Editor_MissingFeature_Error");
+ return false;
+ }
+
+ return originalFeaturePtr->HasName();
+}
+
/// Several cases should be handled while saving changes:
/// 1) a feature is not in editor's cache
/// I. a feature was created