forked from organicmaps/organicmaps
Fixed bug with late search results after clearing.
This commit is contained in:
parent
6c51fe243e
commit
3d714dfbd2
2 changed files with 8 additions and 4 deletions
|
@ -804,7 +804,7 @@ void Framework::ShowRectFixed(m2::RectD const & r)
|
|||
|
||||
void Framework::UpdateUserViewportChanged()
|
||||
{
|
||||
if (!m_lastSearch.m_query.empty())
|
||||
if (IsISActive())
|
||||
{
|
||||
(void)GetCurrentPosition(m_lastSearch.m_lat, m_lastSearch.m_lon);
|
||||
m_lastSearch.m_callback = bind(&Framework::OnSearchResultsCallback, this, _1);
|
||||
|
@ -827,10 +827,13 @@ void Framework::OnSearchResultsCallback(search::Results const & results)
|
|||
|
||||
void Framework::OnSearchResultsCallbackUI(search::Results const & results)
|
||||
{
|
||||
m2::RectD dummy;
|
||||
FillSearchResultsMarks(results, dummy);
|
||||
if (IsISActive())
|
||||
{
|
||||
m2::RectD dummy;
|
||||
FillSearchResultsMarks(results, dummy);
|
||||
|
||||
Invalidate();
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
void Framework::ClearAllCaches()
|
||||
|
|
|
@ -269,6 +269,7 @@ public:
|
|||
size_t ShowAllSearchResults();
|
||||
|
||||
void StartInteractiveSearch(search::SearchParams const & params) { m_lastSearch = params; }
|
||||
bool IsISActive() const { return !m_lastSearch.m_query.empty(); }
|
||||
void CancelInteractiveSearch();
|
||||
|
||||
/// Calculate distance and direction to POI for the given position.
|
||||
|
|
Loading…
Add table
Reference in a new issue