From 55387fd7ea9aa90de172099c3513aa61f6daf00e Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 13 Feb 2002 20:12:31 +0000 Subject: [PATCH] This is a three line fix for some inconsistancies between the gui dialogs and the panel controls for the autopilot. The heading dialog would only show the last setting you did through it, even if it was later tweaked with the bug on the hsi. The altitude dialog did a similar thing. Now the values default to the same that show on the panel displays. --- src/Autopilot/auto_gui.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Autopilot/auto_gui.cxx b/src/Autopilot/auto_gui.cxx index a4859803d..642ed3579 100644 --- a/src/Autopilot/auto_gui.cxx +++ b/src/Autopilot/auto_gui.cxx @@ -219,6 +219,8 @@ void NewHeading(puObject *cb) { // string ApHeadingLabel( "Enter New Heading" ); // ApHeadingDialogMessage -> setLabel(ApHeadingLabel.c_str()); + float heading = current_autopilot->get_DGTargetHeading(); + ApHeadingDialogInput -> setValue ( heading ); ApHeadingDialogInput -> acceptInput(); FG_PUSH_PUI_DIALOG( ApHeadingDialog ); } @@ -291,6 +293,8 @@ void ApAltitudeDialog_OK (puObject *me) void NewAltitude(puObject *cb) { + float altitude = current_autopilot->get_TargetAltitude() * SG_METER_TO_FEET; + ApAltitudeDialogInput -> setValue( altitude ); ApAltitudeDialogInput -> acceptInput(); FG_PUSH_PUI_DIALOG( ApAltitudeDialog ); } -- 2.39.5