]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/KLN89/kln89_page_apt.cxx
fix NAV receiver vs GPS bugs
[flightgear.git] / src / Instrumentation / KLN89 / kln89_page_apt.cxx
index 1f4ffcb8aa9e51f1d88bfad4b90ae6567020c127..67a4c8ddcb03dfbed2ab8e2ca051ed038c3dcc33 100644 (file)
@@ -3,7 +3,7 @@
 //
 // Written by David Luff, started 2005.
 //
-// Copyright (C) 2005 - David C Luff - david.luff@nottingham.ac.uk
+// Copyright (C) 2005 - David C Luff - daveluff AT ntlworld.com
 //
 // This program is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
 #endif
 
 #include "kln89_page_apt.hxx"
-#include <ATCDCL/commlist.hxx>
+
+#include <cassert>
+
+#if ENABLE_ATCDCL
+#    include <ATCDCL/commlist.hxx>
+#else
+  #include <ATC/atcutils.hxx>
+#endif
 #include <Main/globals.hxx>
 #include <Airports/runways.hxx>
 #include <Airports/simple.hxx>
@@ -643,8 +650,12 @@ void KLN89AptPage::ClrPressed() {
 void KLN89AptPage::EntPressed() {
        if(_entInvert) {
                _entInvert = false;
-               _last_apt_id = _apt_id;
-               _apt_id = _save_apt_id;
+               if(_kln89->_dtoReview) {
+                       _kln89->DtoInitiate(_apt_id);
+               } else {
+                       _last_apt_id = _apt_id;
+                       _apt_id = _save_apt_id;
+               }
        } else if(_subPage == 7 && _kln89->_mode == KLN89_MODE_CRSR && _uLinePos > 0) {
                // We are selecting an approach
                if(_iafDialog) {