GPS dialog
* fix initial type selection * fix nearest search on 'any'
This commit is contained in:
parent
590acec3db
commit
3b15c3c039
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue