forked from organicmaps/organicmaps
fixed bug with "frozen screen while navigating".
This commit is contained in:
parent
c0e05ff9d3
commit
7160c3f57e
2 changed files with 4 additions and 4 deletions
|
@ -28,14 +28,14 @@ namespace gui
|
|||
Controller::~Controller()
|
||||
{}
|
||||
|
||||
void Controller::SelectElements(m2::PointD const & pt, elem_list_t & l)
|
||||
void Controller::SelectElements(m2::PointD const & pt, elem_list_t & l, bool onlyVisible)
|
||||
{
|
||||
for (elem_list_t::const_iterator it = m_Elements.begin();
|
||||
it != m_Elements.end();
|
||||
++it)
|
||||
{
|
||||
shared_ptr<gui::Element> const & e = *it;
|
||||
if (e->roughHitTest(pt) && e->hitTest(pt))
|
||||
if ((!onlyVisible || e->isVisible()) && e->roughHitTest(pt) && e->hitTest(pt))
|
||||
l.push_back(e);
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ namespace gui
|
|||
{
|
||||
elem_list_t l;
|
||||
|
||||
SelectElements(pt, l);
|
||||
SelectElements(pt, l, true);
|
||||
|
||||
/// selecting first hit-tested element from the list
|
||||
if (!l.empty())
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace gui
|
|||
elem_list_t m_Elements;
|
||||
|
||||
/// select elements under specified point
|
||||
void SelectElements(m2::PointD const & pt, elem_list_t & l);
|
||||
void SelectElements(m2::PointD const & pt, elem_list_t & l, bool onlyVisible);
|
||||
|
||||
/// Invalidate GUI function
|
||||
TInvalidateFn m_InvalidateFn;
|
||||
|
|
Loading…
Add table
Reference in a new issue