1
0
Fork 0

GPS dialog

* fix initial type selection
* fix nearest search on 'any'
This commit is contained in:
James Turner 2013-10-02 22:29:24 +01:00
parent 590acec3db
commit 3b15c3c039

View file

@ -14,7 +14,8 @@
var scratchValid = dlg.getNode("scratch/valid", 1);
var searchIsWaypoints = 0;
var anySpec = 'vor,airport,heliport,ils,seaport,fix,ndb,waypoint,tacan,city,town';
dlg.getNode("search-type", 1).setValue("airport");
var updateSearchResults = func(isWpts, index = 0)
{
searchIsWaypoints = isWpts;
@ -93,6 +94,8 @@
var doSearchNearest = func
{
var ty = dlg.getNode("search-type").getValue();
if (ty == 'any') ty = anySpec;
searchResults = positioned.findWithinRange(200.0, ty);
updateSearchResults(0);
}