Commit aa13b5e2 authored by DonLakeFlyer's avatar DonLakeFlyer

parent 828bd7ae
...@@ -662,12 +662,12 @@ void TransectStyleComplexItem::_adjustTransectsForTerrain(void) ...@@ -662,12 +662,12 @@ void TransectStyleComplexItem::_adjustTransectsForTerrain(void)
_amslEntryAltChanged(); _amslEntryAltChanged();
_amslExitAltChanged(); _amslExitAltChanged();
_minAMSLAltitude = 0; _minAMSLAltitude = qQNaN();
_maxAMSLAltitude = 0; _maxAMSLAltitude = qQNaN();
for (const QList<CoordInfo_t>& transect: _transects) { for (const QList<CoordInfo_t>& transect: _transects) {
for (const CoordInfo_t& coordInfo: transect) { for (const CoordInfo_t& coordInfo: transect) {
_minAMSLAltitude = qMin(_minAMSLAltitude, coordInfo.coord.altitude()); _minAMSLAltitude = std::fmin(_minAMSLAltitude, coordInfo.coord.altitude());
_maxAMSLAltitude = qMax(_maxAMSLAltitude, coordInfo.coord.altitude()); _maxAMSLAltitude = std::fmax(_maxAMSLAltitude, coordInfo.coord.altitude());
} }
} }
emit minAMSLAltitudeChanged(_minAMSLAltitude); emit minAMSLAltitudeChanged(_minAMSLAltitude);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment