Skip to content

Commit

Permalink
Try to fix #20901
Browse files Browse the repository at this point in the history
  • Loading branch information
Chumva committed Sep 25, 2024
1 parent b97a493 commit 4bae107
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,10 @@ class GpxTrackAnalysis {
private fun addWptAttribute(
point: WptPt, attribute: PointAttributes, pointsAnalyser: TrackPointsAnalyser?
) {
if (!hasSpeedData() && attribute.speed > 0 && totalDistance > 0) {
if (!hasSpeedData() && attribute.speed > 0) {
setHasData(POINT_SPEED, true)
}
if (!hasElevationData() && !attribute.elevation.isNaN() && totalDistance > 0) {
if (!hasElevationData() && !attribute.elevation.isNaN()) {
setHasData(POINT_ELEVATION, true)
}
pointsAnalyser?.onAnalysePoint(this, point, attribute)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static void onAnalysePoint(@NonNull GpxTrackAnalysis analysis, @NonNull W

attribute.setAttributeValue(tag, value);

if (!analysis.hasData(tag) && attribute.hasValidValue(tag) && analysis.getTotalDistance() > 0) {
if (!analysis.hasData(tag) && attribute.hasValidValue(tag)) {
analysis.setHasData(tag, true);
}
}
Expand Down

0 comments on commit 4bae107

Please sign in to comment.