From 1b3d122497dea318bae2e760560caa98c799a660 Mon Sep 17 00:00:00 2001 From: "r.kuznetsov" Date: Mon, 14 Aug 2017 14:25:40 +0300 Subject: [PATCH] Fixed priority of search icons --- map/framework.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/map/framework.cpp b/map/framework.cpp index 1205a11672..602ce0094b 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -1789,14 +1789,19 @@ void Framework::FillSearchResultsMarks(search::Results::ConstIter begin, if (!r.HasPoint()) continue; - SearchMarkPoint * mark = - static_cast(guard.m_controller.CreateUserMark(r.GetFeatureCenter())); + auto mark = static_cast(guard.m_controller.CreateUserMark(r.GetFeatureCenter())); ASSERT_EQUAL(mark->GetMarkType(), UserMark::Type::SEARCH, ()); auto const isFeature = r.GetResultType() == search::Result::RESULT_FEATURE; if (isFeature) mark->SetFoundFeature(r.GetFeatureID()); mark->SetMatchedName(r.GetString()); + if (isFeature && m_localAdsManager.Contains(r.GetFeatureID())) + { + mark->SetCustomSymbol("search-adv"); + continue; + } + // TODO: delete me after Cian project is finished. if (m_cianSearchMode) { @@ -1808,8 +1813,6 @@ void Framework::FillSearchResultsMarks(search::Results::ConstIter begin, mark->SetCustomSymbol("search-booking"); else if (r.m_metadata.m_isSponsoredBank) mark->SetCustomSymbol("search-tinkoff"); - else if (isFeature && m_localAdsManager.Contains(r.GetFeatureID())) - mark->SetCustomSymbol("search-adv"); } }