Skip to content

Commit

Permalink
Merge pull request #20903 from osmandapp/fix_#20901
Browse files Browse the repository at this point in the history
Try to fix #20901
  • Loading branch information
Chumva committed Sep 25, 2024
2 parents b97a493 + 4bae107 commit fe5fd21
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 fe5fd21

Please sign in to comment.