commit
aac0f4b378
2 changed files with 11 additions and 0 deletions
|
@ -398,6 +398,8 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
|||
if (fragmentRef != null) {
|
||||
fragmentRef.get().rebuildMenu(centerMarker);
|
||||
}
|
||||
ContextMenuLayer contextMenuLayer = mapActivity.getMapLayers().getContextMenuLayer();
|
||||
contextMenuLayer.updateContextMenu();
|
||||
centerMarker = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -228,6 +228,15 @@ public class ContextMenuLayer extends OsmandMapLayer {
|
|||
this.selectOnMap = selectOnMap;
|
||||
}
|
||||
|
||||
public void updateContextMenu() {
|
||||
for (OsmandMapLayer layer : view.getLayers()) {
|
||||
if (layer instanceof ContextMenuLayer.IMoveObjectProvider && ((ContextMenuLayer.IMoveObjectProvider) layer).isObjectMovable(selectedObject)) {
|
||||
selectedObjectContextMenuProvider = (IContextMenuProvider) layer;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void populateObjectContextMenu(LatLon latLon, Object o, ContextMenuAdapter adapter, MapActivity mapActivity) {
|
||||
if (menu.hasHiddenBottomInfo()) {
|
||||
|
|
Loading…
Reference in a new issue