diff options
author | v.mikhaylenko <v.mikhaylenko@corp.mail.ru> | 2015-07-20 15:45:42 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:56:49 +0300 |
commit | 5ae43a6573c19465df572872729ffb53d86f7b27 (patch) | |
tree | f492510afefe40e0af188f5ae59e839ae11a20cf /iphone/Maps/Classes/MWMPlacePageViewManager.mm | |
parent | 3f7f85bbb3e52860f2e012dbc886bae9e0efb5b2 (diff) |
[ios] Fixed bug with remove bookmark after category was changed.
Diffstat (limited to 'iphone/Maps/Classes/MWMPlacePageViewManager.mm')
-rw-r--r-- | iphone/Maps/Classes/MWMPlacePageViewManager.mm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/iphone/Maps/Classes/MWMPlacePageViewManager.mm b/iphone/Maps/Classes/MWMPlacePageViewManager.mm index c3ead60691..3490422966 100644 --- a/iphone/Maps/Classes/MWMPlacePageViewManager.mm +++ b/iphone/Maps/Classes/MWMPlacePageViewManager.mm @@ -204,17 +204,17 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageManagerState) - (void)removeBookmark { Framework & f = GetFramework(); - UserMark const * mark = m_userMark->GetUserMark(); - BookmarkAndCategory bookmarkAndCategory = f.FindBookmark(mark); + BookmarkCategory * bookmarkCategory = f.GetBookmarkManager().GetBmCategory(self.entity.bac.first); + UserMark const * bookmark = bookmarkCategory->GetBookmark(self.entity.bac.second); + BookmarkAndCategory const bookmarkAndCategory = f.FindBookmark(bookmark); self.entity.type = MWMPlacePageEntityTypeRegular; - BookmarkCategory * category = f.GetBmCategory(bookmarkAndCategory.first); - PoiMarkPoint const * poi = f.GetAddressMark(mark->GetOrg()); + PoiMarkPoint const * poi = f.GetAddressMark(bookmark->GetOrg()); m_userMark.reset(new UserMarkCopy(poi, false)); f.ActivateUserMark(poi); - if (category) + if (bookmarkCategory) { - category->DeleteBookmark(bookmarkAndCategory.second); - category->SaveToKMLFile(); + bookmarkCategory->DeleteBookmark(bookmarkAndCategory.second); + bookmarkCategory->SaveToKMLFile(); } f.Invalidate(); } |