forked from organicmaps/organicmaps
Formatting and style markups.
This commit is contained in:
parent
8b16282360
commit
9b47827887
4 changed files with 21 additions and 11 deletions
|
@ -87,7 +87,12 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
void SetData(BookmarkData const & data) { m_data = data; SetStyle(m_data.GetType()); }
|
||||
void SetData(BookmarkData const & data)
|
||||
{
|
||||
m_data = data;
|
||||
SetStyle(m_data.GetType());
|
||||
}
|
||||
|
||||
BookmarkData const & GetData() const { return m_data; }
|
||||
|
||||
virtual Type GetMarkType() const override { return UserMark::Type::BOOKMARK; }
|
||||
|
@ -97,7 +102,13 @@ public:
|
|||
void SetName(string const & name) { m_data.SetName(name); }
|
||||
/// @return Now its a bookmark color - name of icon file
|
||||
string const & GetType() const { return m_data.GetType(); }
|
||||
void SetType(string const & type) { m_data.SetType(type); SetStyle(type); }
|
||||
|
||||
void SetType(string const & type)
|
||||
{
|
||||
m_data.SetType(type);
|
||||
SetStyle(type);
|
||||
}
|
||||
|
||||
m2::RectD GetViewport() const { return m2::RectD(GetOrg(), GetOrg()); }
|
||||
|
||||
string const & GetDescription() const { return m_data.GetDescription(); }
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
#include "map/navigator.hpp"
|
||||
#include "map/animator.hpp"
|
||||
|
||||
#include "map/api_mark_container.hpp"
|
||||
#include "map/api_mark_point.hpp"
|
||||
#include "map/bookmark.hpp"
|
||||
#include "map/bookmark_manager.hpp"
|
||||
#include "map/api_mark_point.hpp"
|
||||
#include "map/api_mark_container.hpp"
|
||||
#include "map/pin_click_manager.hpp"
|
||||
|
||||
#include "map/mwm_url.hpp"
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
|
||||
graphics::DisplayList * StyledPoint::GetDisplayList(UserMarkDLCache * cache) const
|
||||
{
|
||||
UserMarkDLCache::Key key = GetStyle().empty() ? GetContainer()->GetDefaultKey()
|
||||
: UserMarkDLCache::Key(GetStyle(),
|
||||
graphics::EPosAbove,
|
||||
GetContainer()->GetDepth());
|
||||
UserMarkContainer const * container = GetContainer();
|
||||
UserMarkDLCache::Key const key = GetStyle().empty() ? container->GetDefaultKey()
|
||||
: UserMarkDLCache::Key(GetStyle(),
|
||||
graphics::EPosAbove,
|
||||
container->GetDepth());
|
||||
return cache->FindUserMark(key);
|
||||
}
|
||||
|
||||
|
|
|
@ -179,9 +179,7 @@ namespace
|
|||
|
||||
UserMarkDLCache::Key UserMarkContainer::GetDefaultKey() const
|
||||
{
|
||||
return UserMarkDLCache::Key(GetTypeName(),
|
||||
graphics::EPosCenter,
|
||||
GetDepth());
|
||||
return UserMarkDLCache::Key(GetTypeName(), graphics::EPosCenter, GetDepth());
|
||||
}
|
||||
|
||||
void UserMarkContainer::InitStaticMarks(UserMarkContainer * container)
|
||||
|
|
Loading…
Add table
Reference in a new issue