diff --git a/gui/dialogs/gps.xml b/gui/dialogs/gps.xml index 73d99691b..279f7498c 100644 --- a/gui/dialogs/gps.xml +++ b/gui/dialogs/gps.xml @@ -9,26 +9,27 @@ var gps = props.globals.getNode("/instrumentation/gps/", 1); var dlg = props.globals.getNode("/sim/gui/dialogs/gps", 1); var cmd = gps.getNode("command", 1); + var scratch = gps.getNode("scratch", 1); - var scratchValid = scratch.getNode("valid", 1); - var searchIsWaypoints = 0; - var anySpec = 'vor,airport,heliport,ils,seaport,fix,ndb,waypoint,tacan,city,town'; + var scratchValid = dlg.getNode("scratch/valid", 1); + var searchIsWaypoints = 0; + var anySpec = 'vor,airport,heliport,ils,seaport,fix,ndb,waypoint,tacan,city,town'; - var updateSearchResults = func(isWpts, index = 0) - { - searchIsWaypoints = isWpts; - dlg.getNode("scratch-index", 1).setValue(index); + var updateSearchResults = func(isWpts, index = 0) + { + searchIsWaypoints = isWpts; + dlg.getNode("scratch-index", 1).setValue(index); - var lastIndex = size(searchResults) - 1; - dlg.getNode("scratch-has-next", 1).setValue((index + 1) < lastIndex); + var lastIndex = size(searchResults) - 1; + dlg.getNode("scratch-has-next", 1).setValue((index + 1) < lastIndex); - if (size(searchResults) < 1) { - scratchValid.setBoolValue(0); - return; - } + if (size(searchResults) < 1) { + scratchValid.setBoolValue(0); + return; + } - updateScratch(); - } + updateScratch(); + } var updateScratch = func { @@ -64,8 +65,8 @@ } - scratch.getNode("mag-bearing-deg", 1).setValue(cd[0] + magvar()); - scratch.getNode("distance-nm", 1).setValue(cd[1]); + dlg.getNode("scratch-mag-bearing-deg", 1).setValue(cd[0] + magvar()); + dlg.getNode("scratch-distance-nm", 1).setValue(cd[1]); gui.dialog_update("gps"); } @@ -484,7 +485,7 @@ - /instrumentation/gps/scratch/valid + /sim/gui/dialogs/gps/scratch/valid table @@ -534,7 +535,7 @@ 0 Bearing: %3.0f - /instrumentation/gps/scratch/mag-bearing-deg + /sim/gui/dialogs/gps/scratch-mag-bearing-deg true @@ -542,7 +543,7 @@ 1 Distance: %5.1fnm - /instrumentation/gps/scratch/distance-nm + /sim/gui/dialogs/gps/scratch-distance-nm true