| 1005 | } |
| 1006 | |
| 1007 | void BookmarkManager::SetTrackSelectionInfo(Track::TrackSelectionInfo const & trackSelectionInfo, bool notifyListeners) |
| 1008 | { |
| 1009 | CHECK_THREAD_CHECKER(m_threadChecker, ()); |
| 1010 | CHECK_NOT_EQUAL(trackSelectionInfo.m_trackId, kml::kInvalidTrackId, ()); |
| 1011 | |
| 1012 | auto const markId = GetTrackSelectionMarkId(trackSelectionInfo.m_trackId); |
| 1013 | if (markId == kml::kInvalidMarkId) |
| 1014 | { |
| 1015 | SetTrackSelectionMark(trackSelectionInfo.m_trackId, trackSelectionInfo.m_trackPoint, |
| 1016 | trackSelectionInfo.m_distFromBegM); |
| 1017 | return; |
| 1018 | } |
| 1019 | CHECK_NOT_EQUAL(markId, kml::kInvalidMarkId, ()); |
| 1020 | |
| 1021 | auto trackSelectionMark = GetMarkForEdit<TrackSelectionMark>(markId); |
| 1022 | trackSelectionMark->SetPosition(trackSelectionInfo.m_trackPoint); |
| 1023 | trackSelectionMark->SetDistance(trackSelectionInfo.m_distFromBegM); |
| 1024 | |
| 1025 | if (notifyListeners && m_elevationActivePointChanged != nullptr) |
| 1026 | m_elevationActivePointChanged(); |
| 1027 | } |
| 1028 | |
| 1029 | void BookmarkManager::OnTrackSelected(kml::TrackId trackId) |
| 1030 | { |
no test coverage detected