Fixed newly introduced bug.

This commit is contained in:
GaidamakUA 2016-05-31 15:59:44 +03:00
parent 7c63cd893d
commit 0a4d651cd3

View file

@ -333,14 +333,15 @@ public class ContextMenuLayer extends OsmandMapLayer {
Object selectedObj = selectedObjects.keySet().iterator().next();
LatLon latLon = null;
PointDescription pointDescription = null;
if (selectedObjectContextMenuProvider != null) {
latLon = selectedObjectContextMenuProvider.getObjectLocation(selectedObj);
pointDescription = selectedObjectContextMenuProvider.getObjectName(selectedObj);
final IContextMenuProvider provider = selectedObjects.get(selectedObj);
if (provider != null) {
latLon = provider.getObjectLocation(selectedObj);
pointDescription = provider.getObjectName(selectedObj);
}
if (latLon == null) {
latLon = getLatLon(point, tileBox);
}
showContextMenu(latLon, pointDescription, selectedObj, selectedObjects.get(selectedObj));
showContextMenu(latLon, pointDescription, selectedObj, provider);
return true;
} else if (selectedObjects.size() > 1) {