diff options
author | vng <viktor.govako@gmail.com> | 2013-02-13 21:29:34 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:50:52 +0300 |
commit | f2e148b7b9646dd3e6ab62630624b9269cf1e853 (patch) | |
tree | d9b359320bd4d2f98b1e3f0ab8c425dec67e901a /map/address_finder.cpp | |
parent | 129b857579cd8abe800b9019493238a83da8e27b (diff) |
[bookmarks] Add house number to pin text if name is empty.
Diffstat (limited to 'map/address_finder.cpp')
-rw-r--r-- | map/address_finder.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/map/address_finder.cpp b/map/address_finder.cpp index e6649c2ceb..afe460a876 100644 --- a/map/address_finder.cpp +++ b/map/address_finder.cpp @@ -576,16 +576,19 @@ void Framework::AddressInfo::MakeFrom(search::Result const & res) string Framework::AddressInfo::FormatPinText() const { + // select name or house if name is empty + string const & ret = (m_name.empty() ? m_house : m_name); + char const * type = GetBestType(); if (type) { - if (m_name.empty()) + if (ret.empty()) return type; else - return m_name + " (" + string(type) + ')'; + return ret + " (" + string(type) + ')'; } else - return m_name; + return ret; } string Framework::AddressInfo::FormatAddress() const |