Fix context menu
This commit is contained in:
parent
9f31490793
commit
4d9a7f1056
2 changed files with 4 additions and 4 deletions
|
@ -343,7 +343,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
final double longitude,
|
||||
final ContextMenuAdapter adapter,
|
||||
Object selectedObj,
|
||||
boolean all) {
|
||||
boolean configureMenu) {
|
||||
ItemBuilder itemBuilder = new ItemBuilder();
|
||||
|
||||
adapter.addItem(itemBuilder
|
||||
|
@ -411,7 +411,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
.setOrder(ADD_GPX_WAYPOINT_ITEM_ORDER)
|
||||
.setListener(listener).createItem();
|
||||
|
||||
if (all) {
|
||||
if (configureMenu) {
|
||||
adapter.addItem(addGpxItem);
|
||||
} else if (selectedObj instanceof WptPt
|
||||
&& getMyApplication().getSelectedGpxHelper().getSelectedGPXFile((WptPt) selectedObj) != null) {
|
||||
|
|
|
@ -1062,7 +1062,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
|||
}
|
||||
}
|
||||
|
||||
public ContextMenuAdapter getActionsContextMenuAdapter(boolean all) {
|
||||
public ContextMenuAdapter getActionsContextMenuAdapter(boolean configure) {
|
||||
MapActivity mapActivity = getMapActivity();
|
||||
final ContextMenuAdapter menuAdapter = new ContextMenuAdapter(getMyApplication());
|
||||
if (mapActivity != null) {
|
||||
|
@ -1070,7 +1070,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
|||
for (OsmandMapLayer layer : mapActivity.getMapView().getLayers()) {
|
||||
layer.populateObjectContextMenu(latLon, getObject(), menuAdapter, mapActivity);
|
||||
}
|
||||
mapActivity.getMapActions().addActionsToAdapter(all ? 0 : latLon.getLatitude(), all ? 0 : latLon.getLongitude(), menuAdapter, getObject(), all);
|
||||
mapActivity.getMapActions().addActionsToAdapter(configure ? 0 : latLon.getLatitude(), configure ? 0 : latLon.getLongitude(), menuAdapter, getObject(), configure);
|
||||
}
|
||||
return menuAdapter;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue