diff options
author | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2015-10-02 15:51:13 +0300 |
---|---|---|
committer | r.kuznetsov <r.kuznetsov@corp.mail.ru> | 2015-11-30 16:16:36 +0300 |
commit | 69abd4c441ca87697597526eceda67797da7b20c (patch) | |
tree | 53f3fb23fa258c9d98fa48a258b533c71e166601 /map/user_mark_container.cpp | |
parent | c585602380659ac2af054bba438d5b8e1300fcd9 (diff) |
Fixed user marks rendering in case of Drape reinitialization
Diffstat (limited to 'map/user_mark_container.cpp')
-rw-r--r-- | map/user_mark_container.cpp | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/map/user_mark_container.cpp b/map/user_mark_container.cpp index b92132b4be..745eaf5236 100644 --- a/map/user_mark_container.cpp +++ b/map/user_mark_container.cpp @@ -11,8 +11,6 @@ #include "std/algorithm.hpp" -//////////////////////////////////////////////////////////////////////// - namespace { class FindMarkFunctor @@ -65,9 +63,7 @@ namespace } size_t const VisibleFlag = 0; - size_t const VisibleDirtyFlag = 1; - size_t const DrawableFlag = 2; - size_t const DrawableDirtyFlag = 3; + size_t const DrawableFlag = 1; } UserMarkContainer::UserMarkContainer(double layerDepth, UserMarkType type, Framework & fm) @@ -145,11 +141,7 @@ void UserMarkContainer::ReleaseController() return; df::TileKey key = CreateTileKey(this); - if (IsVisibleFlagDirty() || IsDrawableFlagDirty()) - engine->ChangeVisibilityUserMarksLayer(key, IsVisible() && IsDrawable()); - - m_flags[VisibleDirtyFlag] = false; - m_flags[DrawableDirtyFlag] = false; + engine->ChangeVisibilityUserMarksLayer(key, IsVisible() && IsDrawable()); if (IsDirty()) { @@ -237,29 +229,18 @@ void UserMarkContainer::Clear(size_t skipCount/* = 0*/) void UserMarkContainer::SetIsDrawable(bool isDrawable) { if (IsDrawable() != isDrawable) - { - m_flags[DrawableDirtyFlag] = true; m_flags[DrawableFlag] = isDrawable; - } } void UserMarkContainer::SetIsVisible(bool isVisible) { if (IsVisible() != isVisible) - { - m_flags[VisibleDirtyFlag] = true; m_flags[VisibleFlag] = isVisible; - } } -bool UserMarkContainer::IsVisibleFlagDirty() +void UserMarkContainer::Update() { - return m_flags[VisibleDirtyFlag]; -} - -bool UserMarkContainer::IsDrawableFlagDirty() -{ - return m_flags[DrawableDirtyFlag]; + SetDirty(); } namespace |