fix for future use when new track recording starts
This commit is contained in:
parent
fb3820f907
commit
162182a8ee
1 changed files with 6 additions and 3 deletions
|
@ -100,12 +100,15 @@ public class GpxBlockStatisticsBuilder {
|
||||||
GPXFile gpxFile = getGPXFile();
|
GPXFile gpxFile = getGPXFile();
|
||||||
GpxDisplayItem gpxDisplayItem = null;
|
GpxDisplayItem gpxDisplayItem = null;
|
||||||
GPXTrackAnalysis analysis = null;
|
GPXTrackAnalysis analysis = null;
|
||||||
|
boolean withoutGaps = false;
|
||||||
if (gpxFile.tracks.size() > 0) {
|
if (gpxFile.tracks.size() > 0) {
|
||||||
gpxDisplayItem = getDisplayItem(gpxFile);
|
gpxDisplayItem = getDisplayItem(gpxFile);
|
||||||
analysis = gpxDisplayItem.analysis;
|
|
||||||
}
|
}
|
||||||
if (gpxDisplayItem != null && analysis != null) {
|
if (gpxDisplayItem != null) {
|
||||||
boolean withoutGaps = !selectedGpxFile.isJoinSegments() && gpxDisplayItem.isGeneralTrack();
|
analysis = gpxDisplayItem.analysis;
|
||||||
|
withoutGaps = !selectedGpxFile.isJoinSegments() && gpxDisplayItem.isGeneralTrack();
|
||||||
|
}
|
||||||
|
if (analysis != null) {
|
||||||
float totalDistance = withoutGaps ? analysis.totalDistanceWithoutGaps : analysis.totalDistance;
|
float totalDistance = withoutGaps ? analysis.totalDistanceWithoutGaps : analysis.totalDistance;
|
||||||
float timeSpan = withoutGaps ? analysis.timeSpanWithoutGaps : analysis.timeSpan;
|
float timeSpan = withoutGaps ? analysis.timeSpanWithoutGaps : analysis.timeSpan;
|
||||||
String asc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationUp, app);
|
String asc = OsmAndFormatter.getFormattedAlt(analysis.diffElevationUp, app);
|
||||||
|
|
Loading…
Reference in a new issue