Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qt
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2012-10-16 14:41:30 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:45:38 +0300
commit31c919ff69bfee5f40895c25e0ac8a239b0aab7f (patch)
tree475a83657c3b714abf505dd54ec6faee145f5a85 /qt
parente2150dcdbd3741a3316777d5b975bcd66fae8307 (diff)
[desktop] Delete "Search" bookmarks category when closing search.
Diffstat (limited to 'qt')
-rw-r--r--qt/search_panel.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/qt/search_panel.cpp b/qt/search_panel.cpp
index 62a0ce8c3f..3eefb9d225 100644
--- a/qt/search_panel.cpp
+++ b/qt/search_panel.cpp
@@ -106,6 +106,8 @@ namespace
return pm;
}
*/
+
+ char const * SEARCH_CATEGORY = "Search";
}
void SearchPanel::OnSearchResult(ResultsT * res)
@@ -115,9 +117,8 @@ void SearchPanel::OnSearchResult(ResultsT * res)
m_pTable->setRowCount(0);
m_results.clear();
- string const searchCategory = "Search";
Framework & frm = m_pDrawWidget->GetFramework();
- frm.DeleteBmCategory(searchCategory);
+ frm.DeleteBmCategory(SEARCH_CATEGORY);
for (ResultsT::IterT i = res->Begin(); i != res->End(); ++i)
{
@@ -132,7 +133,7 @@ void SearchPanel::OnSearchResult(ResultsT * res)
if (e.GetResultType() == ResultT::RESULT_FEATURE)
{
// For debug purposes: add bookmarks for search results
- frm.AddBookmark(searchCategory,
+ frm.AddBookmark(SEARCH_CATEGORY,
Bookmark(e.GetFeatureCenter(), e.GetString(), "placemark-red"));
m_pTable->setItem(rowCount, 0,
@@ -216,7 +217,10 @@ void SearchPanel::showEvent(QShowEvent *)
void SearchPanel::hideEvent(QHideEvent *)
{
+ m_pDrawWidget->GetFramework().DeleteBmCategory(SEARCH_CATEGORY);
+
disconnect(m_pDrawWidget, SIGNAL(ViewportChanged()), this, SLOT(OnViewportChanged()));
+
m_pDrawWidget->CloseSearch();
}