Explicit 'cleared' callback for FP Delegate.
Fix bug 940, where GPS remains in active LEG mode when the route is cleared. (there is an associated flight gear code change). With this fix, the work-around in the GUI dialog is no longer required.
This commit is contained in:
parent
abffa6df24
commit
6612848745
2 changed files with 8 additions and 5 deletions
|
@ -75,9 +75,15 @@ var RouteManagerDelegate = {
|
|||
}
|
||||
},
|
||||
|
||||
cleared: func
|
||||
{
|
||||
debug.dump("saw active flightplan cleared, deactivating");
|
||||
# see http://https://code.google.com/p/flightgear-bugs/issues/detail?id=885
|
||||
fgcommand("activate-flightplan", props.Node.new({"activate": 0}));
|
||||
},
|
||||
|
||||
waypointsChanged: func
|
||||
{
|
||||
debug.dump('saw waypoints changed');
|
||||
},
|
||||
|
||||
currentWaypointChanged: func
|
||||
|
|
|
@ -37,10 +37,7 @@ command interface /autopilot/route-manager/input:
|
|||
return int(selection.getValue());
|
||||
}
|
||||
|
||||
var clear = func {
|
||||
# deactive first, see http://https://code.google.com/p/flightgear-bugs/issues/detail?id=885
|
||||
fgcommand("activate-flightplan", props.Node.new({"activate": 0}));
|
||||
|
||||
var clear = func {
|
||||
flightplan().cleanPlan();
|
||||
selection.setIntValue(-1);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue