Fixed newly introduced bug.
This commit is contained in:
parent
7c63cd893d
commit
0a4d651cd3
1 changed files with 5 additions and 4 deletions
|
@ -333,14 +333,15 @@ public class ContextMenuLayer extends OsmandMapLayer {
|
||||||
Object selectedObj = selectedObjects.keySet().iterator().next();
|
Object selectedObj = selectedObjects.keySet().iterator().next();
|
||||||
LatLon latLon = null;
|
LatLon latLon = null;
|
||||||
PointDescription pointDescription = null;
|
PointDescription pointDescription = null;
|
||||||
if (selectedObjectContextMenuProvider != null) {
|
final IContextMenuProvider provider = selectedObjects.get(selectedObj);
|
||||||
latLon = selectedObjectContextMenuProvider.getObjectLocation(selectedObj);
|
if (provider != null) {
|
||||||
pointDescription = selectedObjectContextMenuProvider.getObjectName(selectedObj);
|
latLon = provider.getObjectLocation(selectedObj);
|
||||||
|
pointDescription = provider.getObjectName(selectedObj);
|
||||||
}
|
}
|
||||||
if (latLon == null) {
|
if (latLon == null) {
|
||||||
latLon = getLatLon(point, tileBox);
|
latLon = getLatLon(point, tileBox);
|
||||||
}
|
}
|
||||||
showContextMenu(latLon, pointDescription, selectedObj, selectedObjects.get(selectedObj));
|
showContextMenu(latLon, pointDescription, selectedObj, provider);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
} else if (selectedObjects.size() > 1) {
|
} else if (selectedObjects.size() > 1) {
|
||||||
|
|
Loading…
Reference in a new issue