forked from organicmaps/organicmaps-tmp
[search] Fix bug in SearchAdditional.
This commit is contained in:
parent
eea00e0f1a
commit
201d223b62
2 changed files with 10 additions and 7 deletions
|
@ -1284,7 +1284,7 @@ void Query::SearchFeatures(Params const & params, MWMVectorT const & mwmInfo, in
|
|||
}
|
||||
}
|
||||
|
||||
void Query::SearchInMWM(Index::MwmLock const & mwmLock, Params const & params, int ind)
|
||||
void Query::SearchInMWM(Index::MwmLock const & mwmLock, Params const & params, int ind/* = -1*/)
|
||||
{
|
||||
if (MwmValue * pMwm = mwmLock.GetValue())
|
||||
{
|
||||
|
@ -1427,7 +1427,6 @@ m2::RectD const & Query::GetViewport(int viewportID/* = -1*/) const
|
|||
return m_viewport[1];
|
||||
}
|
||||
}
|
||||
|
||||
m2::PointD Query::GetPosition(int viewportID/* = -1*/) const
|
||||
{
|
||||
if (viewportID == ADDRESS_RECT_ID)
|
||||
|
@ -1519,7 +1518,7 @@ void Query::SearchAdditional(Results & res)
|
|||
if (s == name[0] || s == name[1])
|
||||
{
|
||||
ClearQueues();
|
||||
SearchInMWM(mwmLock, params, 0);
|
||||
SearchInMWM(mwmLock, params);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -135,11 +135,15 @@ private:
|
|||
bool SearchLocality(MwmValue * pMwm, impl::Locality & res);
|
||||
|
||||
void SearchFeatures();
|
||||
void SearchFeatures(Params const & params, MWMVectorT const & mwmInfo, int ind);
|
||||
|
||||
/// Do search in particular map. Pass offsets == 0 if you don't want
|
||||
/// results set to be intersected with source feature's offsets.
|
||||
void SearchInMWM(Index::MwmLock const & mwmLock, Params const & params, int ind);
|
||||
/// @param[in] ind Index of viewport rect to search (@see m_viewport).
|
||||
/// If ind == -1, don't do any matching with features in viewport (@see m_offsetsInViewport).
|
||||
//@{
|
||||
/// Do search in all maps from mwmInfo.
|
||||
void SearchFeatures(Params const & params, MWMVectorT const & mwmInfo, int ind);
|
||||
/// Do search in particular map (mwmLock).
|
||||
void SearchInMWM(Index::MwmLock const & mwmLock, Params const & params, int ind = -1);
|
||||
//@}
|
||||
|
||||
void SuggestStrings(Results & res);
|
||||
bool MatchForSuggestionsImpl(strings::UniString const & token, int8_t lang, Results & res);
|
||||
|
|
Loading…
Add table
Reference in a new issue