forked from organicmaps/organicmaps
[bookmarks][looonely] Do not force visibility to false for categories that does not have visible constituents. MAPSME-15349
This commit is contained in:
parent
863ca990b5
commit
bcabf11a31
1 changed files with 0 additions and 10 deletions
|
@ -4131,19 +4131,14 @@ void BookmarkManager::MarksChangesTracker::InferVisibility(BookmarkCategory * co
|
|||
visibility.emplace(compilationId);
|
||||
}
|
||||
auto const groupId = group->GetID();
|
||||
bool hasUserMarksOrDanglingBookmarks = false;
|
||||
for (kml::MarkId const userMark : m_bmManager->GetUserMarkIds(groupId))
|
||||
{
|
||||
if (!m_bmManager->IsBookmark(userMark))
|
||||
{
|
||||
hasUserMarksOrDanglingBookmarks = true;
|
||||
continue;
|
||||
}
|
||||
Bookmark * const bookmark = m_bmManager->GetBookmarkForEdit(userMark);
|
||||
bool isVisible = false;
|
||||
if (bookmark->GetCompilations().empty())
|
||||
{
|
||||
hasUserMarksOrDanglingBookmarks = true;
|
||||
// Bookmarks that not belong to any compilation have to be visible.
|
||||
// They can be hidden only by changing parental BookmarkCategory visibility to false.
|
||||
isVisible = true;
|
||||
|
@ -4161,11 +4156,6 @@ void BookmarkManager::MarksChangesTracker::InferVisibility(BookmarkCategory * co
|
|||
}
|
||||
bookmark->SetIsVisible(isVisible);
|
||||
}
|
||||
if (visibility.empty() && m_bmManager->GetTrackIds(groupId).empty() &&
|
||||
!hasUserMarksOrDanglingBookmarks)
|
||||
{
|
||||
group->SetIsVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
void BookmarkManager::MarksChangesTracker::OnAttachBookmark(kml::MarkId markId,
|
||||
|
|
Loading…
Add table
Reference in a new issue