forked from organicmaps/organicmaps
[search marks] renaming used -> visited
This commit is contained in:
parent
3c85bb6b55
commit
d0984bf97f
3 changed files with 10 additions and 10 deletions
|
@ -1857,7 +1857,7 @@ void Framework::FillSearchResultsMarks(search::Results::ConstIter begin,
|
|||
m_searchMarks.MarkUnavailableIfNeeded(mark);
|
||||
}
|
||||
|
||||
if (isFeature && m_searchMarks.IsUsed(mark->GetFeatureID()))
|
||||
if (isFeature && m_searchMarks.IsVisited(mark->GetFeatureID()))
|
||||
mark->SetVisited(true);
|
||||
|
||||
if (fn)
|
||||
|
@ -4008,7 +4008,7 @@ void Framework::ShowViewportSearchResults(search::Results const & results, bool
|
|||
|
||||
void Framework::ClearViewportSearchResults()
|
||||
{
|
||||
m_searchMarks.ClearUsed();
|
||||
m_searchMarks.ClearVisited();
|
||||
m_searchMarks.ClearUnavailable();
|
||||
GetBookmarkManager().GetEditSession().ClearGroup(UserMark::Type::SEARCH);
|
||||
}
|
||||
|
|
|
@ -727,21 +727,21 @@ void SearchMarks::OnDeactivate(FeatureID const & featureId)
|
|||
return;
|
||||
|
||||
mark->SetVisited(true);
|
||||
m_used.insert(featureId);
|
||||
m_visited.insert(featureId);
|
||||
|
||||
mark->SetAvailable(true);
|
||||
mark->SetReason({});
|
||||
});
|
||||
}
|
||||
|
||||
bool SearchMarks::IsUsed(FeatureID const & id) const
|
||||
bool SearchMarks::IsVisited(FeatureID const & id) const
|
||||
{
|
||||
return m_used.find(id) != m_used.cend();
|
||||
return m_visited.find(id) != m_visited.cend();
|
||||
}
|
||||
|
||||
void SearchMarks::ClearUsed()
|
||||
void SearchMarks::ClearVisited()
|
||||
{
|
||||
m_used.clear();
|
||||
m_visited.clear();
|
||||
}
|
||||
|
||||
void SearchMarks::SetUnavailable(FeatureID const & id, std::string const & reason)
|
||||
|
|
|
@ -117,8 +117,8 @@ public:
|
|||
void OnActivate(FeatureID const & featureId);
|
||||
void OnDeactivate(FeatureID const & featureId);
|
||||
|
||||
bool IsUsed(FeatureID const & id) const;
|
||||
void ClearUsed();
|
||||
bool IsVisited(FeatureID const & id) const;
|
||||
void ClearVisited();
|
||||
|
||||
void SetUnavailable(FeatureID const & id, std::string const & reason);
|
||||
bool IsUnavailable(FeatureID const & id) const;
|
||||
|
@ -136,6 +136,6 @@ private:
|
|||
|
||||
static std::map<std::string, m2::PointF> m_searchMarksSizes;
|
||||
|
||||
std::set<FeatureID> m_used;
|
||||
std::set<FeatureID> m_visited;
|
||||
std::map<FeatureID, std::string> m_unavailable;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue