1
0
Fork 0

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:
James Turner 2012-12-31 17:38:18 +00:00
parent abffa6df24
commit 6612848745
2 changed files with 8 additions and 5 deletions

View file

@ -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

View file

@ -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);
}