1
0
Fork 0

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.
This commit is contained in:
curt 2002-02-13 20:12:31 +00:00
parent 6191fae106
commit 55387fd7ea

View file

@ -219,6 +219,8 @@ void NewHeading(puObject *cb)
{ {
// string ApHeadingLabel( "Enter New Heading" ); // string ApHeadingLabel( "Enter New Heading" );
// ApHeadingDialogMessage -> setLabel(ApHeadingLabel.c_str()); // ApHeadingDialogMessage -> setLabel(ApHeadingLabel.c_str());
float heading = current_autopilot->get_DGTargetHeading();
ApHeadingDialogInput -> setValue ( heading );
ApHeadingDialogInput -> acceptInput(); ApHeadingDialogInput -> acceptInput();
FG_PUSH_PUI_DIALOG( ApHeadingDialog ); FG_PUSH_PUI_DIALOG( ApHeadingDialog );
} }
@ -291,6 +293,8 @@ void ApAltitudeDialog_OK (puObject *me)
void NewAltitude(puObject *cb) void NewAltitude(puObject *cb)
{ {
float altitude = current_autopilot->get_TargetAltitude() * SG_METER_TO_FEET;
ApAltitudeDialogInput -> setValue( altitude );
ApAltitudeDialogInput -> acceptInput(); ApAltitudeDialogInput -> acceptInput();
FG_PUSH_PUI_DIALOG( ApAltitudeDialog ); FG_PUSH_PUI_DIALOG( ApAltitudeDialog );
} }