forked from organicmaps/organicmaps-tmp
Reset last edited category after its uploading to the catalog.
This commit is contained in:
parent
09460d8630
commit
e9d0389ce8
1 changed files with 8 additions and 0 deletions
|
@ -1409,6 +1409,11 @@ kml::MarkGroupId BookmarkManager::CheckAndCreateDefaultCategory()
|
|||
{
|
||||
CHECK_THREAD_CHECKER(m_threadChecker, ());
|
||||
for (auto const & cat : m_categories)
|
||||
{
|
||||
if (IsEditableCategory(cat.first) && !IsCategoryFromCatalog(cat.first))
|
||||
return cat.first;
|
||||
}
|
||||
for (auto const & cat : m_categories)
|
||||
{
|
||||
if (IsEditableCategory(cat.first))
|
||||
return cat.first;
|
||||
|
@ -2299,6 +2304,9 @@ void BookmarkManager::UploadToCatalog(kml::MarkGroupId categoryId, kml::AccessRu
|
|||
}
|
||||
}
|
||||
|
||||
if (cat->GetID() == m_lastEditedGroupId)
|
||||
SetLastEditedBmCategory(CheckAndCreateDefaultCategory());
|
||||
|
||||
if (m_onCatalogUploadFinishedHandler)
|
||||
m_onCatalogUploadFinishedHandler(result, {}, categoryId, categoryId);
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue