| 899 | } |
| 900 | |
| 901 | Track::TrackSelectionInfo BookmarkManager::FindNearestTrack(m2::RectD const & touchRect, |
| 902 | TracksFilter const & tracksFilter) const |
| 903 | { |
| 904 | CHECK_THREAD_CHECKER(m_threadChecker, ()); |
| 905 | Track::TrackSelectionInfo selectionInfo; |
| 906 | |
| 907 | for (auto const & pair : m_categories) |
| 908 | { |
| 909 | auto const & category = *pair.second; |
| 910 | if (!category.IsVisible()) |
| 911 | continue; |
| 912 | |
| 913 | for (auto trackId : category.GetUserLines()) |
| 914 | { |
| 915 | auto const track = GetTrack(trackId); |
| 916 | if (tracksFilter && !tracksFilter(track)) |
| 917 | continue; |
| 918 | |
| 919 | track->UpdateSelectionInfo(touchRect, selectionInfo); |
| 920 | } |
| 921 | } |
| 922 | |
| 923 | return selectionInfo; |
| 924 | } |
| 925 | |
| 926 | Track::TrackSelectionInfo BookmarkManager::GetTrackSelectionInfo(kml::TrackId const & trackId) const |
| 927 | { |
no test coverage detected