From: curt Date: Wed, 13 Feb 2002 20:12:31 +0000 (+0000) Subject: This is a three line fix for some inconsistancies between the gui dialogs and X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=55387fd7ea9aa90de172099c3513aa61f6daf00e;p=flightgear.git 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. --- 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 ); }