From 249fbedcae232822e97a7923e72769d44d3c9f19 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 27 Feb 2002 18:05:17 +0000 Subject: [PATCH] Make sure when setting autopilot heading via the menu that the current heading value is presented between 0 and 360. --- src/Autopilot/auto_gui.cxx | 1 + 1 file changed, 1 insertion(+) 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 ); -- 2.39.2