diff options
author | vng <viktor.govako@gmail.com> | 2012-09-21 03:31:52 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:43:37 +0300 |
commit | d03e167bc0484fcf9837da2a84ff2bc220ad0203 (patch) | |
tree | 568ba7847b0287e787ab2d1afdd63cf6f05475f9 /qt | |
parent | 94fa7d216cffdffe1fbfd58923fe2e6f13523b3a (diff) |
Framework::GetVisiblePOI is working for symbols now.
Diffstat (limited to 'qt')
-rw-r--r-- | qt/draw_widget.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/qt/draw_widget.cpp b/qt/draw_widget.cpp index 0695a5288c..93a6bae616 100644 --- a/qt/draw_widget.cpp +++ b/qt/draw_widget.cpp @@ -343,16 +343,24 @@ namespace qt QPoint const & pt = e->pos(); QMenu menu; - vector<string> types; - m_framework->GetFeatureTypes(m2::PointD(pt.x(), pt.y()), types); + Framework::AddressInfo info; + m2::PointD dummy; + if (m_framework->GetVisiblePOI(m2::PointD(pt.x(), pt.y()), dummy, info)) + { + add_string(menu, "POI"); + } + else + { + vector<string> types; + m_framework->GetFeatureTypes(m2::PointD(pt.x(), pt.y()), types); - for (size_t i = 0; i < types.size(); ++i) - add_string(menu, types[i]); + for (size_t i = 0; i < types.size(); ++i) + add_string(menu, types[i]); - (void)menu.addSeparator(); + m_framework->GetAddressInfo(m_framework->PtoG(m2::PointD(pt.x(), pt.y())), info); + } - Framework::AddressInfo info; - m_framework->GetAddressInfo(m_framework->PtoG(m2::PointD(pt.x(), pt.y())), info); + (void)menu.addSeparator(); if (!info.m_name.empty()) add_string(menu, info.m_name); |