From: curt Date: Wed, 27 Feb 2002 18:05:17 +0000 (+0000) Subject: Make sure when setting autopilot heading via the menu that the current X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=249fbedcae232822e97a7923e72769d44d3c9f19;p=flightgear.git Make sure when setting autopilot heading via the menu that the current heading value is presented between 0 and 360. --- diff --git a/src/Autopilot/auto_gui.cxx b/src/Autopilot/auto_gui.cxx index 642ed3579..20ccc7bed 100644 --- a/src/Autopilot/auto_gui.cxx +++ b/src/Autopilot/auto_gui.cxx @@ -220,6 +220,7 @@ void NewHeading(puObject *cb) // string ApHeadingLabel( "Enter New Heading" ); // ApHeadingDialogMessage -> setLabel(ApHeadingLabel.c_str()); float heading = current_autopilot->get_DGTargetHeading(); + while ( heading < 0.0 ) { heading += 360.0; } ApHeadingDialogInput -> setValue ( heading ); ApHeadingDialogInput -> acceptInput(); FG_PUSH_PUI_DIALOG( ApHeadingDialog );