diff options
author | Sergey Magidovich <mgsergio@mapswithme.com> | 2016-06-09 16:14:40 +0300 |
---|---|---|
committer | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-06-23 19:23:42 +0300 |
commit | 70828a529bfbcd4c73885cb0ac1f2d869ecf0abf (patch) | |
tree | cf923125ba573fa7fb16d1cee6d8532f258e9e64 /indexer/osm_editor.cpp | |
parent | ccd5ee0bd8544e8cea4f52ea31174e9c2d492397 (diff) |
Disable old data editing.
Diffstat (limited to 'indexer/osm_editor.cpp')
-rw-r--r-- | indexer/osm_editor.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/indexer/osm_editor.cpp b/indexer/osm_editor.cpp index 5fa071628c..69a044948e 100644 --- a/indexer/osm_editor.cpp +++ b/indexer/osm_editor.cpp @@ -592,12 +592,11 @@ vector<uint32_t> Editor::GetFeaturesByStatus(MwmSet::MwmId const & mwmId, Featur EditableProperties Editor::GetEditableProperties(FeatureType const & feature) const { - // Disable editor for old data. - if (!version::IsSingleMwm(feature.GetID().m_mwmId.GetInfo()->m_version.GetVersion())) - return {}; + ASSERT(version::IsSingleMwm(feature.GetID().m_mwmId.GetInfo()->m_version.GetVersion()), + ("Edit mode should be available only on new datas")); - if (GetFeatureStatus(feature.GetID()) == FeatureStatus::Obsolete) - return {}; + ASSERT(GetFeatureStatus(feature.GetID()) != FeatureStatus::Obsolete, + ("Edit mode should not be available on obsolete features")); // TODO(mgsergio): Check if feature is in the area where editing is disabled in the config. auto editableProperties = GetEditablePropertiesForTypes(feature::TypesHolder(feature)); |