Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/drape
diff options
context:
space:
mode:
authorDaria Volvenkova <d.volvenkova@corp.mail.ru>2016-11-24 14:08:04 +0300
committerDaria Volvenkova <d.volvenkova@corp.mail.ru>2016-11-24 14:08:04 +0300
commit1ee5d809edfdd56c08adad417c269160e887f09b (patch)
treea743b447af8e6479f6c588654807b926e95980a1 /drape
parent1e2abf5883a94a893bea25a6a46e51cb8c0d6f61 (diff)
Fixed selection of area titles.
Diffstat (limited to 'drape')
-rw-r--r--drape/overlay_handle.hpp1
-rw-r--r--drape/overlay_tree.cpp6
2 files changed, 4 insertions, 3 deletions
diff --git a/drape/overlay_handle.hpp b/drape/overlay_handle.hpp
index 78e9224192..930ad547b2 100644
--- a/drape/overlay_handle.hpp
+++ b/drape/overlay_handle.hpp
@@ -81,6 +81,7 @@ public:
virtual uint64_t GetPriorityInFollowingMode() const;
virtual bool IsBound() const { return false; }
+ virtual bool HasLinearFeatureShape() const { return false; }
virtual bool Enable3dExtention() const { return true; }
diff --git a/drape/overlay_tree.cpp b/drape/overlay_tree.cpp
index 8f7a0ecc87..429cb1c4bf 100644
--- a/drape/overlay_tree.cpp
+++ b/drape/overlay_tree.cpp
@@ -214,7 +214,7 @@ void OverlayTree::InsertHandle(ref_ptr<OverlayHandle> handle,
bool rejectByDepth = false;
if (!rejectBySelected && modelView.isPerspective())
{
- bool const pathTextComparation = handle->HasDynamicAttributes() || rivalHandle->HasDynamicAttributes();
+ bool const pathTextComparation = handle->HasLinearFeatureShape() || rivalHandle->HasLinearFeatureShape();
rejectByDepth = !pathTextComparation &&
handleToCompare->GetPivot(modelView, true).y > rivalHandle->GetPivot(modelView, true).y;
}
@@ -395,7 +395,7 @@ void OverlayTree::Select(m2::PointD const & glbPoint, TOverlayContainer & result
for (auto const & handle : m_handlesCache)
{
- if (!handle->HasDynamicAttributes() && rect.IsPointInside(handle->GetPivot(screen, false)))
+ if (!handle->HasLinearFeatureShape() && rect.IsPointInside(handle->GetPivot(screen, false)))
result.push_back(handle);
}
}
@@ -405,7 +405,7 @@ void OverlayTree::Select(m2::RectD const & rect, TOverlayContainer & result) con
ScreenBase screen = m_traits.m_modelView;
ForEachInRect(rect, [&](ref_ptr<OverlayHandle> const & h)
{
- if (!h->HasDynamicAttributes() && h->IsVisible() && h->GetFeatureID().IsValid())
+ if (!h->HasLinearFeatureShape() && h->IsVisible() && h->GetFeatureID().IsValid())
{
OverlayHandle::Rects shape;
h->GetPixelShape(screen, screen.isPerspective(), shape);