diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2014-06-23 16:53:56 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:18:22 +0300 |
commit | d7dd7600354ab12b16ac8441085d98f8f5572a4c (patch) | |
tree | d69b5f760b7d6cf619710d2d940f1ceb063790a3 /map/user_mark_container.cpp | |
parent | 9f1ce5eafb3f10c338ee479647327b87ee612962 (diff) |
[core] separate user mark for MyPosition
Diffstat (limited to 'map/user_mark_container.cpp')
-rw-r--r-- | map/user_mark_container.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/map/user_mark_container.cpp b/map/user_mark_container.cpp index 05e6f52d24..916939af89 100644 --- a/map/user_mark_container.cpp +++ b/map/user_mark_container.cpp @@ -159,12 +159,16 @@ void UserMarkContainer::Clear() namespace { static scoped_ptr<PoiMarkPoint> s_selectionUserMark; + static scoped_ptr<MyPositionMarkPoint> s_myPosition; } -void UserMarkContainer::InitPoiSelectionMark(UserMarkContainer * container) +void UserMarkContainer::InitStaticMarks(UserMarkContainer * container) { if (s_selectionUserMark == NULL) s_selectionUserMark.reset(new PoiMarkPoint(container)); + + if (s_myPosition == NULL) + s_myPosition.reset(new MyPositionMarkPoint(container)); } PoiMarkPoint * UserMarkContainer::UserMarkForPoi() @@ -173,6 +177,12 @@ PoiMarkPoint * UserMarkContainer::UserMarkForPoi() return s_selectionUserMark.get(); } +MyPositionMarkPoint * UserMarkContainer::UserMarkForMyPostion() +{ + ASSERT(s_myPosition != NULL, ()); + return s_myPosition.get(); +} + UserMark * UserMarkContainer::CreateUserMark(m2::PointD const & ptOrg) { m_userMarks.push_back(AllocateUserMark(ptOrg)); |