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
diff options
context:
space:
mode:
Diffstat (limited to 'map/framework.cpp')
-rw-r--r--map/framework.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/map/framework.cpp b/map/framework.cpp
index 11cb3d01fa..973bd1af6a 100644
--- a/map/framework.cpp
+++ b/map/framework.cpp
@@ -285,6 +285,8 @@ void Framework::OnViewportChanged(ScreenBase const & screen)
{
m_currentModelView = screen;
+ auto const forceSearchInViewport = !m_isViewportInitialized;
+
if (!m_isViewportInitialized)
{
m_isViewportInitialized = true;
@@ -300,7 +302,7 @@ void Framework::OnViewportChanged(ScreenBase const & screen)
}
}
- PokeSearchInViewport();
+ PokeSearchInViewport(forceSearchInViewport);
m_trafficManager.UpdateViewport(m_currentModelView);
m_localAdsManager.UpdateViewport(m_currentModelView);
@@ -1326,16 +1328,15 @@ void Framework::SetCurrentCountryChangedListener(TCurrentCountryChanged const &
m_lastReportedCountry = kInvalidCountryId;
}
-void Framework::PokeSearchInViewport()
+void Framework::PokeSearchInViewport(bool forceSearch)
{
if (!m_isViewportInitialized || !IsViewportSearchActive())
return;
- auto & intent = m_searchIntents[static_cast<size_t>(search::Mode::Viewport)];
- auto & params = intent.m_params;
+ auto params = m_searchIntents[static_cast<size_t>(search::Mode::Viewport)].m_params;
SetViewportIfPossible(params);
SetCurrentPositionIfPossible(params);
- Search(intent);
+ Search(params, forceSearch);
}
bool Framework::SearchEverywhere(search::EverywhereSearchParams const & params)