diff options
Diffstat (limited to 'indexer/osm_editor.cpp')
-rw-r--r-- | indexer/osm_editor.cpp | 19 |
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 |