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 ex = (int) point.x;
int ey = (int) point.y; int ey = (int) point.y;
for (FavouritePoint n : getPoints()) { 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 ex = (int) point.x;
int ey = (int) point.y; int ey = (int) point.y;
for (SelectedGpxFile g : selectedGpxHelper.getSelectedGPXFiles()) { for (SelectedGpxFile g : selectedGpxHelper.getSelectedGPXFiles()) {
List<WptPt> pts = getListStarPoints(g); if (!isSynced(g)) {
// int fcolor = g.getColor() == 0 ? clr : g.getColor(); List<WptPt> pts = getListStarPoints(g);
for (WptPt n : pts) { // int fcolor = g.getColor() == 0 ? clr : g.getColor();
int x = (int) tb.getPixXFromLatLon(n.lat, n.lon); for (WptPt n : pts) {
int y = (int) tb.getPixYFromLatLon(n.lat, n.lon); int x = (int) tb.getPixXFromLatLon(n.lat, n.lon);
if (calculateBelongs(ex, ey, x, y, r)) { int y = (int) tb.getPixYFromLatLon(n.lat, n.lon);
res.add(n); if (calculateBelongs(ex, ey, x, y, r)) {
res.add(n);
}
} }
} }
} }