Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'qt/draw_widget.cpp')
-rw-r--r--qt/draw_widget.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/qt/draw_widget.cpp b/qt/draw_widget.cpp
index 7999667147..9827ecb051 100644
--- a/qt/draw_widget.cpp
+++ b/qt/draw_widget.cpp
@@ -370,12 +370,10 @@ void DrawWidget::SubmitRoutingPoint(m2::PointD const & pt)
void DrawWidget::SubmitBookmark(m2::PointD const & pt)
{
- size_t categoryIndex = 0;
- auto category = m_framework.GetBookmarkManager().GetBmCategory(categoryIndex);
- if (category == nullptr)
- categoryIndex = m_framework.GetBookmarkManager().CreateBmCategory("Desktop_bookmarks");
+ if (!m_framework.GetBookmarkManager().HasBmCategory(m_bookmarksCategoryId))
+ m_bookmarksCategoryId = m_framework.GetBookmarkManager().CreateBookmarkCategory("Desktop_bookmarks");
BookmarkData data("", "placemark-red");
- m_framework.GetBookmarkManager().AddBookmark(categoryIndex, m_framework.P3dtoG(pt), data);
+ m_framework.GetBookmarkManager().GetEditSession().CreateBookmark(m_framework.P3dtoG(pt), data, m_bookmarksCategoryId);
}
void DrawWidget::FollowRoute()