| 1588 | } |
| 1589 | |
| 1590 | void BookmarkManager::ClearGroup(kml::MarkGroupId groupId) |
| 1591 | { |
| 1592 | CHECK_THREAD_CHECKER(m_threadChecker, ()); |
| 1593 | ASSERT(m_compilations.count(groupId) == 0, ()); |
| 1594 | |
| 1595 | auto * group = GetGroup(groupId); |
| 1596 | for (auto markId : group->GetUserMarks()) |
| 1597 | { |
| 1598 | if (IsBookmarkCategory(groupId)) |
| 1599 | { |
| 1600 | m_changesTracker.OnDetachBookmark(markId, groupId); |
| 1601 | m_bookmarks.erase(markId); |
| 1602 | } |
| 1603 | else |
| 1604 | { |
| 1605 | m_userMarks.erase(markId); |
| 1606 | } |
| 1607 | m_changesTracker.OnDeleteMark(markId); |
| 1608 | } |
| 1609 | for (auto trackId : group->GetUserLines()) |
| 1610 | { |
| 1611 | DeleteTrackSelectionMark(trackId); |
| 1612 | m_changesTracker.OnDeleteLine(trackId); |
| 1613 | m_tracks.erase(trackId); |
| 1614 | } |
| 1615 | group->Clear(); |
| 1616 | } |
| 1617 | |
| 1618 | std::string BookmarkManager::GetCategoryName(kml::MarkGroupId categoryId) const |
| 1619 | { |