From c620142778e87d0b54a20f4d0b3749875847466b Mon Sep 17 00:00:00 2001 From: mfranz Date: Tue, 9 May 2006 20:59:07 +0000 Subject: [PATCH] display valid target altitudes only --- gui/dialogs/waypoints.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gui/dialogs/waypoints.xml b/gui/dialogs/waypoints.xml index 7249321d3..21faa8e81 100644 --- a/gui/dialogs/waypoints.xml +++ b/gui/dialogs/waypoints.xml @@ -63,9 +63,11 @@ command interface /autopilot/route-manager/input: var lon = wp[i].getNode("longitude-deg").getValue(); var lat = wp[i].getNode("latitude-deg").getValue(); var alt = wp[i].getNode("altitude-ft").getValue(); - var entry = sprintf("%d: %-5s %3.2f lon %3.2f lat %.0f ft", - i + 1, id, lon, lat, alt); - + var entry = sprintf("%d: %-5s %3.2f lon %3.2f lat", + i + 1, id, lon, lat); + if (alt > -9990) { + entry ~= sprintf(" %.0f ft", alt); + } list.getChild("value", i, 1).setValue(entry); }