forked from organicmaps/organicmaps
[search] Fixed an uncaught CancelException.
This commit is contained in:
parent
8bb5ff57b9
commit
f4ce13ea29
1 changed files with 7 additions and 4 deletions
|
@ -420,7 +420,8 @@ void Ranker::SuggestStrings()
|
|||
|
||||
void Ranker::UpdateResults(bool lastUpdate)
|
||||
{
|
||||
BailIfCancelled();
|
||||
if (!lastUpdate)
|
||||
BailIfCancelled();
|
||||
|
||||
MakeRankerResults(m_geocoderParams, m_tentativeResults);
|
||||
RemoveDuplicatingLinear(m_tentativeResults);
|
||||
|
@ -450,7 +451,8 @@ void Ranker::UpdateResults(bool lastUpdate)
|
|||
if (!lastUpdate && i >= m_params.m_batchSize && !m_params.m_viewportSearch)
|
||||
break;
|
||||
|
||||
BailIfCancelled();
|
||||
if (!lastUpdate)
|
||||
BailIfCancelled();
|
||||
|
||||
auto const & rankerResult = m_tentativeResults[i];
|
||||
|
||||
|
@ -475,11 +477,12 @@ void Ranker::UpdateResults(bool lastUpdate)
|
|||
|
||||
m_preRankerResults.clear();
|
||||
|
||||
BailIfCancelled();
|
||||
|
||||
// The last update must be handled by a call to Finish().
|
||||
if (!lastUpdate)
|
||||
{
|
||||
BailIfCancelled();
|
||||
m_emitter.Emit();
|
||||
}
|
||||
}
|
||||
|
||||
void Ranker::ClearCaches() { m_localities.ClearCache(); }
|
||||
|
|
Loading…
Add table
Reference in a new issue