diff options
author | vng <viktor.govako@gmail.com> | 2012-10-12 17:38:04 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:45:14 +0300 |
commit | eab5d74ba5242b90a1b3bb62e74844b2cc8f3a4c (patch) | |
tree | b5d9af96c0a57da9ad9b1f1edb1963a7dd389d8d /qt | |
parent | a3ffc327071695a23d1c24130fe9b68fae6755af (diff) |
Delete "Search" category when new search is started.
Diffstat (limited to 'qt')
-rw-r--r-- | qt/search_panel.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/qt/search_panel.cpp b/qt/search_panel.cpp index a61e0a35f3..62a0ce8c3f 100644 --- a/qt/search_panel.cpp +++ b/qt/search_panel.cpp @@ -115,8 +115,9 @@ void SearchPanel::OnSearchResult(ResultsT * res) m_pTable->setRowCount(0); m_results.clear(); + string const searchCategory = "Search"; Framework & frm = m_pDrawWidget->GetFramework(); - frm.ClearBookmarks(); + frm.DeleteBmCategory(searchCategory); for (ResultsT::IterT i = res->Begin(); i != res->End(); ++i) { @@ -131,7 +132,8 @@ void SearchPanel::OnSearchResult(ResultsT * res) if (e.GetResultType() == ResultT::RESULT_FEATURE) { // For debug purposes: add bookmarks for search results - frm.AddBookmark("Search", Bookmark(e.GetFeatureCenter(), e.GetString(), "placemark-red")); + frm.AddBookmark(searchCategory, + Bookmark(e.GetFeatureCenter(), e.GetString(), "placemark-red")); m_pTable->setItem(rowCount, 0, create_item(QString::fromUtf8(e.GetFeatureType()))); |