diff options
author | Ilya Zverev <zverik@textual.ru> | 2016-03-24 14:53:43 +0300 |
---|---|---|
committer | Ilya Zverev <zverik@textual.ru> | 2016-03-24 15:12:45 +0300 |
commit | d2580fc84dc4d90f6c4a8ccffb35be80fe03036f (patch) | |
tree | 5f86605fbb0443d2be37bef1630942419d42a520 /editor/xml_feature.cpp | |
parent | 337ad12f120127a707eb17cfa28a775524559593 (diff) |
[editor] Fix name:int_name
Diffstat (limited to 'editor/xml_feature.cpp')
-rw-r--r-- | editor/xml_feature.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/editor/xml_feature.cpp b/editor/xml_feature.cpp index 3b7abad3b6..2367f036eb 100644 --- a/editor/xml_feature.cpp +++ b/editor/xml_feature.cpp @@ -64,6 +64,8 @@ namespace editor char const * const XMLFeature::kDefaultLang = StringUtf8Multilang::GetLangByCode(StringUtf8Multilang::kDefaultCode); +char const * const XMLFeature::kIntlLang = + StringUtf8Multilang::GetLangByCode(StringUtf8Multilang::kInternationalCode); XMLFeature::XMLFeature(Type const type) { @@ -228,6 +230,8 @@ XMLFeature::TMercatorGeometry XMLFeature::GetGeometry() const string XMLFeature::GetName(string const & lang) const { + if (lang == kIntlLang) + return GetTagValue(kIntlName); auto const suffix = (lang == kDefaultLang || lang.empty()) ? "" : ":" + lang; return GetTagValue(kDefaultName + suffix); } @@ -244,8 +248,13 @@ void XMLFeature::SetName(string const & name) void XMLFeature::SetName(string const & lang, string const & name) { - auto const suffix = (lang == kDefaultLang || lang.empty()) ? "" : ":" + lang; - SetTagValue(kDefaultName + suffix, name); + if (lang == kIntlLang) + SetTagValue(kIntlName, name); + else + { + auto const suffix = (lang == kDefaultLang || lang.empty()) ? "" : ":" + lang; + SetTagValue(kDefaultName + suffix, name); + } } void XMLFeature::SetName(uint8_t const langCode, string const & name) |