forked from organicmaps/organicmaps
[searchmarks] Do not mark as visible searchmarks that clicked twice. MAPSME-14931
This commit is contained in:
parent
5e7f69671e
commit
dad7243eda
1 changed files with 8 additions and 3 deletions
|
@ -575,7 +575,10 @@ void SearchMarkPoint::SetSale(bool hasSale)
|
|||
SetAttributeValue(m_hasSale, hasSale);
|
||||
}
|
||||
|
||||
void SearchMarkPoint::SetSelected(bool isSelected) { SetAttributeValue(m_isSelected, isSelected); }
|
||||
void SearchMarkPoint::SetSelected(bool isSelected)
|
||||
{
|
||||
SetAttributeValue(m_isSelected, isSelected);
|
||||
}
|
||||
|
||||
void SearchMarkPoint::SetVisited(bool isVisited)
|
||||
{
|
||||
|
@ -824,10 +827,12 @@ bool SearchMarks::IsThereSearchMarkForFeature(FeatureID const & featureId) const
|
|||
void SearchMarks::OnActivate(FeatureID const & featureId)
|
||||
{
|
||||
m_selectedFeature = featureId;
|
||||
ProcessMarks([&featureId](SearchMarkPoint * mark) -> base::ControlFlow
|
||||
m_visitedSearchMarks.erase(featureId);
|
||||
ProcessMarks([this, &featureId](SearchMarkPoint * mark) -> base::ControlFlow
|
||||
{
|
||||
if (featureId != mark->GetFeatureID())
|
||||
return base::ControlFlow::Continue;
|
||||
mark->SetVisited(false);
|
||||
mark->SetSelected(true);
|
||||
if (!mark->IsAvailable())
|
||||
{
|
||||
|
@ -843,8 +848,8 @@ void SearchMarks::OnActivate(FeatureID const & featureId)
|
|||
|
||||
void SearchMarks::OnDeactivate(FeatureID const & featureId)
|
||||
{
|
||||
m_visitedSearchMarks.insert(featureId);
|
||||
m_selectedFeature = {};
|
||||
m_visitedSearchMarks.insert(featureId);
|
||||
ProcessMarks([&featureId](SearchMarkPoint * mark) -> base::ControlFlow
|
||||
{
|
||||
if (featureId != mark->GetFeatureID())
|
||||
|
|
Loading…
Add table
Reference in a new issue