forked from organicmaps/organicmaps
[ios] 'My Position' bookmark title works like 'Dropped Pin'
This commit is contained in:
parent
631effa46e
commit
43d1973e65
1 changed files with 6 additions and 5 deletions
|
@ -602,6 +602,7 @@ typedef NS_ENUM(NSUInteger, CellRow)
|
|||
- (void)showUserMark:(UserMarkCopy *)mark
|
||||
{
|
||||
[self clearCachedProperties];
|
||||
self.temporaryTitle = nil;
|
||||
|
||||
m_mark.reset(mark);
|
||||
m_cachedMark = m_mark;
|
||||
|
@ -657,9 +658,14 @@ typedef NS_ENUM(NSUInteger, CellRow)
|
|||
search::AddressInfo info;
|
||||
m2::PointD pxPivot;
|
||||
if (f.GetVisiblePOI(f.GtoP([self pinPoint]), pxPivot, info))
|
||||
{
|
||||
return [self nonEmptyTitle:info.GetPinName()];
|
||||
}
|
||||
else
|
||||
{
|
||||
self.temporaryTitle = NSLocalizedString(@"my_position", nil);
|
||||
return [self nonEmptyTitle:[self addressInfo].GetPinName()];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -671,7 +677,6 @@ typedef NS_ENUM(NSUInteger, CellRow)
|
|||
{
|
||||
if (!_title)
|
||||
{
|
||||
self.temporaryTitle = nil;
|
||||
if ([self isBookmark])
|
||||
{
|
||||
Bookmark const * bookmark = static_cast<Bookmark const *>([self userMark]);
|
||||
|
@ -697,10 +702,6 @@ typedef NS_ENUM(NSUInteger, CellRow)
|
|||
{
|
||||
self.temporaryTitle = droppedPinTitle;
|
||||
}
|
||||
else if ([_title isEqualToString:myPositionTitle])
|
||||
{
|
||||
self.temporaryTitle = myPositionTitle;
|
||||
}
|
||||
}
|
||||
return _title;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue