From 8681b04b0cc231036e261e70da6356c27baebc40 Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Fri, 17 Nov 2017 10:37:21 +0200 Subject: [PATCH] Refactor --- OsmAnd/src/net/osmand/plus/GPXUtilities.java | 10 ---------- OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java | 10 ++++++++++ OsmAnd/src/net/osmand/plus/MapMarkersHelper.java | 2 +- OsmAnd/src/net/osmand/plus/views/GPXLayer.java | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/GPXUtilities.java b/OsmAnd/src/net/osmand/plus/GPXUtilities.java index c776837e28..21e12e8a88 100644 --- a/OsmAnd/src/net/osmand/plus/GPXUtilities.java +++ b/OsmAnd/src/net/osmand/plus/GPXUtilities.java @@ -781,16 +781,6 @@ public class GPXUtilities { private Track generalTrack; private TrkSegment generalSegment; - private boolean synced = false; - - public void setSynced(boolean synced) { - this.synced = synced; - } - - public boolean isSynced() { - return synced; - } - public List getPoints() { return Collections.unmodifiableList(points); } diff --git a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java index 3225081c2f..f1f72fd2e4 100644 --- a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java +++ b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java @@ -556,6 +556,16 @@ public class GpxSelectionHelper { private List displayGroups; + private boolean synced; + + public void setSynced(boolean synced) { + this.synced = synced; + } + + public boolean isSynced() { + return synced; + } + public void setGpxFile(GPXFile gpxFile) { this.gpxFile = gpxFile; if (gpxFile.tracks.size() > 0) { diff --git a/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java b/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java index c84b803b78..692b66c392 100644 --- a/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java +++ b/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java @@ -549,7 +549,7 @@ public class MapMarkersHelper { group.setColor(pt.getColor(defColor)); addNewMarkerIfNeeded(group, dbMarkers, new LatLon(pt.lat, pt.lon), pt.name, enabled, null, pt); } - gpx.setSynced(true); + selectedGpxFile.setSynced(true); removeOldMarkersIfNeeded(dbMarkers); } diff --git a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java index 80c6321876..1a259802fb 100644 --- a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java @@ -526,7 +526,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex } private boolean isSynced(SelectedGpxFile g) { - return g.getGpxFile().isSynced(); + return g.isSynced(); } private boolean calculateBelongs(int ex, int ey, int objx, int objy, int radius) {