Do not open context menu for synced icons

This commit is contained in:
PavelRatushny 2017-11-15 17:53:18 +02:00
parent a4e681af2f
commit 956281db89
2 changed files with 12 additions and 8 deletions

View file

@ -184,7 +184,9 @@ public class FavouritesLayer extends OsmandMapLayer implements ContextMenuLayer.
int ex = (int) point.x;
int ey = (int) point.y;
for (FavouritePoint n : getPoints()) {
getFavFromPoint(tb, res, r, ex, ey, n);
if (!getSyncedPoints().contains(n)) {
getFavFromPoint(tb, res, r, ex, ey, n);
}
}
}

View file

@ -539,13 +539,15 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
int ex = (int) point.x;
int ey = (int) point.y;
for (SelectedGpxFile g : selectedGpxHelper.getSelectedGPXFiles()) {
List<WptPt> pts = getListStarPoints(g);
// int fcolor = g.getColor() == 0 ? clr : g.getColor();
for (WptPt n : pts) {
int x = (int) tb.getPixXFromLatLon(n.lat, n.lon);
int y = (int) tb.getPixYFromLatLon(n.lat, n.lon);
if (calculateBelongs(ex, ey, x, y, r)) {
res.add(n);
if (!isSynced(g)) {
List<WptPt> pts = getListStarPoints(g);
// int fcolor = g.getColor() == 0 ? clr : g.getColor();
for (WptPt n : pts) {
int x = (int) tb.getPixXFromLatLon(n.lat, n.lon);
int y = (int) tb.getPixYFromLatLon(n.lat, n.lon);
if (calculateBelongs(ex, ey, x, y, r)) {
res.add(n);
}
}
}
}