From f7548fec1fd9b8056dba3fdb3eaa1a47e3ad4f73 Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 1 Dec 2010 23:57:01 +0000 Subject: [PATCH] Fix bug #185 - altitude ignored when adding waypoints to the route. --- src/Navaids/waypoint.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Navaids/waypoint.cxx b/src/Navaids/waypoint.cxx index 5992774b1..12cee7744 100644 --- a/src/Navaids/waypoint.cxx +++ b/src/Navaids/waypoint.cxx @@ -39,6 +39,9 @@ BasicWaypt::BasicWaypt(const SGGeod& aPos, const string& aIdent, Route* aOwner) _pos(aPos), _ident(aIdent) { + if (aPos.getElevationFt() > -999.0) { + setAltitude(aPos.getElevationFt(), RESTRICT_AT); + } } BasicWaypt::BasicWaypt(const SGWayPoint& aWP, Route* aOwner) :