diff options
author | Alex Zolotarev <alex@maps.me> | 2016-03-29 20:49:24 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2016-03-29 20:49:24 +0300 |
commit | 373b233a7b7ac45ce6b941be245b982a7a514587 (patch) | |
tree | c690aee5799f623b2669d3cd2e4efbdfc103cdff /indexer/feature.cpp | |
parent | 94abd84159b8ea9c05579afdbd33bc55cafe8ab2 (diff) |
[editor] Correctly save “Unknown” state for internet.
Diffstat (limited to 'indexer/feature.cpp')
-rw-r--r-- | indexer/feature.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/indexer/feature.cpp b/indexer/feature.cpp index a90d83e57f..c6a2bdde3d 100644 --- a/indexer/feature.cpp +++ b/indexer/feature.cpp @@ -145,10 +145,19 @@ editor::XMLFeature FeatureType::ToXML(bool serializeType) const // TODO(mgsergio): Use correct sorting instead of SortBySpec based on the config. th.SortBySpec(); Classificator & cl = classif(); + static const uint32_t internetType = cl.GetTypeByPath({"internet_access"}); // TODO(mgsergio): Either improve "OSM"-compatible serialization for more complex types, // or save all our types directly, to restore and reuse them in migration of modified features. for (uint32_t const type : th) { + { // Avoid serialization of "internet" type, it is set separately in the Editor. + // Otherwise we can't reset "internet" to "Unknown" state. + uint32_t truncatedType = type; + ftype::TruncValue(truncatedType, 1); + if (truncatedType == internetType) + continue; + } + string const strType = cl.GetReadableObjectName(type); strings::SimpleTokenizer iter(strType, "-"); string const k = *iter; |