From 164dc6ff1ad1d5eff25f3b655af8547e56fcfe2f Mon Sep 17 00:00:00 2001 From: njohnston Date: Sat, 4 Feb 2017 19:01:44 +0000 Subject: [PATCH] Display all segments of the current recording track in the same colour Previously, when selecting a custom colour for the current recording track, any new track segments after the first one were displayed in the default GPX colour, not the custom colour. --- OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java b/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java index 5a54f95475..3c92058699 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java +++ b/OsmAnd/src/net/osmand/plus/activities/SavingTrackHelper.java @@ -417,13 +417,14 @@ public class SavingTrackHelper extends SQLiteOpenHelper { private void addTrackPoint(WptPt pt, boolean newSegment, long time) { List points = currentTrack.getModifiablePointsToDisplay(); - Track track = currentTrack.getGpxFile().tracks.get(0); + Track track = currentTrack.getModifiableGpxFile().tracks.get(0); assert track.segments.size() == points.size(); if (points.size() == 0 || newSegment) { points.add(new TrkSegment()); } if(track.segments.size() == 0 || newSegment) { track.segments.add(new TrkSegment()); + currentTrack.processPoints(); } if (pt != null) { int ind = points.size() - 1;