forked from organicmaps/organicmaps
[bookmarks] Add house number to pin text if name is empty.
This commit is contained in:
parent
129b857579
commit
f2e148b7b9
1 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue