Merge pull request #3482 from njohnston/recording_track_colour_fix

Display all segments of the current recording track in the same colour
This commit is contained in:
vshcherb 2017-02-26 16:02:03 +01:00 committed by GitHub
commit e42fba2114

View file

@ -417,13 +417,14 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
private void addTrackPoint(WptPt pt, boolean newSegment, long time) {
List<TrkSegment> 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;