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.
This commit is contained in:
parent
e631c9c552
commit
164dc6ff1a
1 changed files with 2 additions and 1 deletions
|
@ -417,13 +417,14 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
|
||||||
|
|
||||||
private void addTrackPoint(WptPt pt, boolean newSegment, long time) {
|
private void addTrackPoint(WptPt pt, boolean newSegment, long time) {
|
||||||
List<TrkSegment> points = currentTrack.getModifiablePointsToDisplay();
|
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();
|
assert track.segments.size() == points.size();
|
||||||
if (points.size() == 0 || newSegment) {
|
if (points.size() == 0 || newSegment) {
|
||||||
points.add(new TrkSegment());
|
points.add(new TrkSegment());
|
||||||
}
|
}
|
||||||
if(track.segments.size() == 0 || newSegment) {
|
if(track.segments.size() == 0 || newSegment) {
|
||||||
track.segments.add(new TrkSegment());
|
track.segments.add(new TrkSegment());
|
||||||
|
currentTrack.processPoints();
|
||||||
}
|
}
|
||||||
if (pt != null) {
|
if (pt != null) {
|
||||||
int ind = points.size() - 1;
|
int ind = points.size() - 1;
|
||||||
|
|
Loading…
Reference in a new issue