Fix #3584
This commit is contained in:
parent
82e5ee817d
commit
8fcf52697f
1 changed files with 6 additions and 2 deletions
|
@ -422,9 +422,10 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
|
|||
if (points.size() == 0 || newSegment) {
|
||||
points.add(new TrkSegment());
|
||||
}
|
||||
if(track.segments.size() == 0 || newSegment) {
|
||||
boolean segmentAdded = false;
|
||||
if (track.segments.size() == 0 || newSegment) {
|
||||
track.segments.add(new TrkSegment());
|
||||
currentTrack.processPoints();
|
||||
segmentAdded = true;
|
||||
}
|
||||
if (pt != null) {
|
||||
int ind = points.size() - 1;
|
||||
|
@ -433,6 +434,9 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
|
|||
TrkSegment lt = track.segments.get(track.segments.size() - 1);
|
||||
lt.points.add(pt);
|
||||
}
|
||||
if (segmentAdded) {
|
||||
currentTrack.processPoints();
|
||||
}
|
||||
currentTrack.getModifiableGpxFile().modifiedTime = time;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue