diff options
author | Yuri Gorshenin <y@maps.me> | 2016-07-15 16:17:33 +0300 |
---|---|---|
committer | Yuri Gorshenin <y@maps.me> | 2016-07-15 16:22:38 +0300 |
commit | 06a0e70e3892daf184290da033b5236c8f4408bb (patch) | |
tree | 1b4e6981136a7b171ce488d1038349869e9cbaff /map | |
parent | 9c128b3a9f250acefae6c213e6410b9a0cd2368c (diff) |
[search] Honor original onResults callback.
Diffstat (limited to 'map')
-rw-r--r-- | map/framework.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/map/framework.cpp b/map/framework.cpp index 04947678ea..e93a57d3ba 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -1067,20 +1067,23 @@ void Framework::StartInteractiveSearch(search::SearchParams const & params) { using namespace search; + auto const originalOnResults = params.m_onResults; + m_lastInteractiveSearchParams = params; m_lastInteractiveSearchParams.SetForceSearch(false); m_lastInteractiveSearchParams.SetMode(search::Mode::Viewport); m_lastInteractiveSearchParams.SetSuggestsEnabled(false); - m_lastInteractiveSearchParams.m_onResults = [this](Results const & results) - { + m_lastInteractiveSearchParams.m_onResults = [this, originalOnResults](Results const & results) { if (!results.IsEndMarker()) { - GetPlatform().RunOnGuiThread([this, results]() - { + GetPlatform().RunOnGuiThread([this, results]() { if (IsInteractiveSearchActive()) FillSearchResultsMarks(results); }); } + + if (originalOnResults) + originalOnResults(results); }; UpdateUserViewportChanged(); } |