diff --git a/kml/type_utils.hpp b/kml/type_utils.hpp index 457a4c134d..b87961820d 100644 --- a/kml/type_utils.hpp +++ b/kml/type_utils.hpp @@ -72,6 +72,12 @@ inline std::string GetDefaultStr(LocalizableString const & str) inline void SetDefaultStr(LocalizableString & localizableStr, std::string const & str) { + if (str.empty()) + { + localizableStr.erase(kDefaultLangCode); + return; + } + localizableStr[kDefaultLangCode] = str; } diff --git a/map/framework.cpp b/map/framework.cpp index 3b2fcb90cd..ad3f0dab17 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -767,7 +767,8 @@ void Framework::FillBookmarkInfo(Bookmark const & bmk, place_page::Info & info) info.SetBookmarkData(bmk.GetData()); info.SetBookmarkId(bmk.GetId()); info.SetBookmarkCategoryId(bmk.GetGroupId()); - auto openingMode = m_routingManager.IsRoutingActive() + auto const description = GetPreferredBookmarkStr(info.GetBookmarkData().m_description); + auto const openingMode = m_routingManager.IsRoutingActive() || description.empty() ? place_page::OpeningMode::Preview : place_page::OpeningMode::PreviewPlus; info.SetOpeningMode(openingMode);