]> git.mxchange.org Git - flightgear.git/commitdiff
This is a three line fix for some inconsistancies between the gui dialogs and
authorcurt <curt>
Wed, 13 Feb 2002 20:12:31 +0000 (20:12 +0000)
committercurt <curt>
Wed, 13 Feb 2002 20:12:31 +0000 (20:12 +0000)
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

index a4859803d83d615ee7bdce17d6bf7df3b13e4201..642ed357962043327ce960ef3b900c3eb9c347ad 100644 (file)
@@ -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 );
 }