diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2014-06-16 17:03:04 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:17:08 +0300 |
commit | 4cfe3ed54199831f4ab58d891419fdb72e65555f (patch) | |
tree | 9bf37cb78fb4e6ca944cb6c8776147d6feef5ae9 /map/user_mark_container.cpp | |
parent | 267837642281b74a8dd67e1fc4c5ef69442d6871 (diff) |
[core] my position click
Framework::GetUserMark find user mark with priority. Bookmark > Api point > Search result
Diffstat (limited to 'map/user_mark_container.cpp')
-rw-r--r-- | map/user_mark_container.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/map/user_mark_container.cpp b/map/user_mark_container.cpp index fcd79afbc1..577e3181a1 100644 --- a/map/user_mark_container.cpp +++ b/map/user_mark_container.cpp @@ -132,7 +132,6 @@ UserMarkContainer::~UserMarkContainer() UserMark const * UserMarkContainer::FindMarkInRect(m2::AnyRectD const & rect, double & d) const { UserMark * mark = NULL; - d = numeric_limits<double>::max(); FindMarkFunctor f(&mark, d, rect); for_each(m_userMarks.begin(), m_userMarks.end(), f); return mark; @@ -164,10 +163,9 @@ void UserMarkContainer::InitPoiSelectionMark(UserMarkContainer * container) s_selectionUserMark.reset(new PoiMarkPoint(container)); } -PoiMarkPoint * UserMarkContainer::UserMarkForPoi(m2::PointD const & ptOrg) +PoiMarkPoint * UserMarkContainer::UserMarkForPoi() { ASSERT(s_selectionUserMark != NULL, ()); - s_selectionUserMark->SetPtOrg(ptOrg); return s_selectionUserMark.get(); } @@ -272,14 +270,16 @@ SelectionContainer::SelectionContainer(Framework & fm) { } -void SelectionContainer::ActivateMark(UserMark const * userMark) +void SelectionContainer::ActivateMark(UserMark const * userMark, bool needAnim) { - KillActivationAnim(); + if (needAnim) + KillActivationAnim(); if (userMark != NULL) { m_ptOrg = userMark->GetOrg(); m_container = userMark->GetContainer(); - StartActivationAnim(); + if (needAnim) + StartActivationAnim(); } else m_container = NULL; |