| 470 | } |
| 471 | |
| 472 | void OverlayTree::Select(m2::PointD const & glbPoint, TOverlayContainer & result) const |
| 473 | { |
| 474 | ScreenBase const & screen = GetModelView(); |
| 475 | m2::PointD const pxPoint = screen.GtoP(glbPoint); |
| 476 | |
| 477 | double constexpr kSearchRectHalfSize = 10.0; |
| 478 | m2::RectD rect(pxPoint, pxPoint); |
| 479 | rect.Inflate(kSearchRectHalfSize, kSearchRectHalfSize); |
| 480 | |
| 481 | /// @todo Why we can't call Select(rect) here? |
| 482 | /// Why we don't check handle->IsVisible(), like in Select(rect)? |
| 483 | for (auto const & handle : m_handlesCache) |
| 484 | if (!handle->HasLinearFeatureShape() && rect.IsPointInside(handle->GetPivot(screen, false))) |
| 485 | result.push_back(handle); |
| 486 | } |
| 487 | |
| 488 | void OverlayTree::Select(m2::RectD const & rect, TOverlayContainer & result) const |
| 489 | { |
no test coverage detected