diff options
author | vng <viktor.govako@gmail.com> | 2013-03-28 20:58:49 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:52:31 +0300 |
commit | eb1efa49ef1d185f4ad3892a1bd6dd5ded1ef441 (patch) | |
tree | cb989a08d3961bd3ebd11d5be750a1b9d504117a /qt/search_panel.cpp | |
parent | 51af009487d19e3d465345baebbf2f3124568ef6 (diff) |
[desktop] Correct distance in search results.
Diffstat (limited to 'qt/search_panel.cpp')
-rw-r--r-- | qt/search_panel.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/qt/search_panel.cpp b/qt/search_panel.cpp index 185e134826..84d5acbc1f 100644 --- a/qt/search_panel.cpp +++ b/qt/search_panel.cpp @@ -148,22 +148,9 @@ void SearchPanel::OnSearchResult(ResultsT * res) Bookmark bm(e.GetFeatureCenter(), e.GetString(), "placemark-red"); frm.AdditionalPoiLayerAddPoi(bm); - m_pTable->setItem(rowCount, 0, - create_item(QString::fromUtf8(e.GetFeatureType()))); - - string strDist; - bool const drawDir = MeasurementUtils::FormatDistance(e.GetDistanceFromCenter(), strDist); - m_pTable->setItem(rowCount, 3, create_item(strDist.c_str())); - - if (drawDir) - { - /* - QTableWidgetItem * item = - new QTableWidgetItem(draw_direction(e.GetDirectionFromCenter()), QString()); - item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - m_pTable->setItem(rowCount, 4, item); - */ - } + m_pTable->setItem(rowCount, 0, create_item(QString::fromUtf8(e.GetFeatureType()))); + + m_pTable->setItem(rowCount, 3, create_item(m_pDrawWidget->GetDistance(e).c_str())); } m_results.push_back(e); |