diff options
author | vng <viktor.govako@gmail.com> | 2013-09-20 19:09:46 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:02:06 +0300 |
commit | 6f2ad31c264c8209072df7cfed9e1027d8e3ee34 (patch) | |
tree | c5bc54c6931a6c559cb97d8d6e66af7285dda1e1 /qt/search_panel.cpp | |
parent | f0122d60b5264645e2679220215c52a8a0083ce0 (diff) |
[search] Correct zoom for result and fix balloon point for streets.
Diffstat (limited to 'qt/search_panel.cpp')
-rw-r--r-- | qt/search_panel.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qt/search_panel.cpp b/qt/search_panel.cpp index d057de3b6f..484756b41e 100644 --- a/qt/search_panel.cpp +++ b/qt/search_panel.cpp @@ -119,7 +119,7 @@ void SearchPanel::OnSearchResult(ResultsT * res) m_pTable->setItem(rowCount, 1, create_item(QString::fromUtf8(e.GetString()))); m_pTable->setItem(rowCount, 2, create_item(QString::fromUtf8(e.GetRegionString()))); - if (e.GetResultType() == ResultT::RESULT_FEATURE) + if (e.GetResultType() != ResultT::RESULT_SUGGESTION) { // For debug purposes: add bookmarks for search results Bookmark bm(e.GetFeatureCenter(), e.GetString(), "placemark-red"); @@ -163,8 +163,10 @@ void SearchPanel::OnSearchTextChanged(QString const & str) void SearchPanel::OnSearchPanelItemClicked(int row, int) { disconnect(m_pDrawWidget, SIGNAL(ViewportChanged()), this, SLOT(OnViewportChanged())); + ASSERT_EQUAL(m_results.size(), static_cast<size_t>(m_pTable->rowCount()), ()); - if (m_results[row].GetResultType() == ResultT::RESULT_FEATURE) + + if (m_results[row].GetResultType() != ResultT::RESULT_SUGGESTION) { // center viewport on clicked item m_pDrawWidget->ShowSearchResult(m_results[row]); @@ -175,6 +177,7 @@ void SearchPanel::OnSearchPanelItemClicked(int row, int) string const suggestion = m_results[row].GetSuggestionString(); m_pEditor->setText(QString::fromUtf8(suggestion.c_str())); } + connect(m_pDrawWidget, SIGNAL(ViewportChanged()), this, SLOT(OnViewportChanged())); } |