forked from organicmaps/organicmaps
Change bookmark set fix.
This commit is contained in:
parent
9f39b6132f
commit
baf9f75ffb
2 changed files with 10 additions and 2 deletions
|
@ -1296,7 +1296,10 @@ public class MWMActivity extends BaseMwmFragmentActivity
|
|||
{
|
||||
setVerticalToolbarVisible(false);
|
||||
if (!isVisible)
|
||||
{
|
||||
Framework.deactivatePopup();
|
||||
mPlacePage.setMapObject(null);
|
||||
}
|
||||
if (previewIntersectsBottomMenu())
|
||||
mBottomToolbar.setVisibility(isVisible ? View.GONE : View.VISIBLE);
|
||||
if (previewIntersectsZoomButtons())
|
||||
|
|
|
@ -281,15 +281,19 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene
|
|||
if (!hasMapObject(mo))
|
||||
{
|
||||
if (mMapObject instanceof Bookmark)
|
||||
storeBookmarkDetails();
|
||||
storeBookmarkDetails(mo);
|
||||
|
||||
mMapObject = mo;
|
||||
refreshViews();
|
||||
}
|
||||
}
|
||||
|
||||
private void storeBookmarkDetails()
|
||||
private void storeBookmarkDetails(MapObject newMapObject)
|
||||
{
|
||||
// no need to store current bookmark if the same is set
|
||||
if (newMapObject instanceof Bookmark && LocationUtils.areLatLonEqual(newMapObject, mMapObject))
|
||||
return;
|
||||
|
||||
final Bookmark bookmark = (Bookmark) mMapObject;
|
||||
final String name = mEtBookmarkName.getText().toString();
|
||||
final String oldName = bookmark.getName();
|
||||
|
@ -652,6 +656,7 @@ public class PlacePageView extends RelativeLayout implements View.OnClickListene
|
|||
getContext().startActivity(intent);
|
||||
break;
|
||||
case R.id.tv__bookmark_group:
|
||||
storeBookmarkDetails(null);
|
||||
selectBookmarkSet();
|
||||
break;
|
||||
case R.id.av__direction:
|
||||
|
|
Loading…
Add table
Reference in a new issue