[iOS] if parse ge0 url has empty name, we don't show balloon

and set it default name.
This commit is contained in:
Kirill Zhdanovich 2013-04-23 18:40:36 +03:00 committed by Alex Zolotarev
parent b28e16a20f
commit fe110dd97e

View file

@ -225,7 +225,13 @@ void InitLocalizedStrings()
m_navController.navigationBarHidden = YES;
Framework & f = GetFramework();
const size_t catIndex = f.LastEditedCategory();
[m_mapViewController showBallonWithCategoryIndex:catIndex andBookmarkIndex:(f.GetBmCategory(catIndex)->GetBookmarksCount() - 1)];
BookmarkCategory * cat = f.GetBmCategory(catIndex);
size_t bookmarkPos = cat->GetBookmarksCount() - 1;
Bookmark * bm = cat->GetBookmark(bookmarkPos);
if (bm->GetName().empty())
bm->SetName([NSLocalizedString(@"dropped_pin", nil) UTF8String]);
else
[m_mapViewController showBallonWithCategoryIndex:catIndex andBookmarkIndex:bookmarkPos];
}
@end