]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/apt_dlg.cxx
Patch from Andy Ross to sort properties in browser.
[flightgear.git] / src / GUI / apt_dlg.cxx
index 6a5581dd8f22d86f7dd87196e91253ed631bd635..dc87cb7eb23c8c0fab9cbc6b1f43e3156d9a350b 100644 (file)
@@ -55,6 +55,8 @@ void AptDialog_OK (puObject *)
        = fgGetNode("/position/longitude-deg");
     static const SGPropertyNode *latitude
        = fgGetNode("/position/latitude-deg");
+    static const SGPropertyNode *master_freeze
+       = fgGetNode("/sim/freeze/master");
 
     SGPath path( globals->get_fg_root() );
     path.append( "Airports" );
@@ -63,9 +65,10 @@ void AptDialog_OK (puObject *)
 
     FGAirport a;
 
-    int freeze = globals->get_freeze();
-    if(!freeze)
-        globals->set_freeze( true );
+    bool freeze = master_freeze->getBoolValue();
+    if ( !freeze ) {
+        fgSetBool("/sim/freeze/master", true);
+    }
 
     char *s;
     AptDialogInput->getValue(&s);
@@ -95,25 +98,18 @@ void AptDialog_OK (puObject *)
             fgSetPosFromAirportIDandHdg( AptId, 
                                          cur_fdm_state->get_Psi() *
                                          SGD_RADIANS_TO_DEGREES);
-            BusyCursor(0);
+            // BusyCursor(0);
             fgReInitSubsystems();
-            // if ( global_tile_mgr.init() ) {
-            // Load the local scenery data
             global_tile_mgr.update( longitude->getDoubleValue(),
                                     latitude->getDoubleValue() );
-            // } else {
-            // SG_LOG( SG_GENERAL, SG_ALERT, 
-            // "Error in Tile Manager initialization!" );
-            // exit(-1);
-            // }
-            BusyCursor(1);
+            // BusyCursor(1);
         } else {
             AptId  += " not in database.";
             mkDialog(AptId.c_str());
         }
     }
     if ( !freeze ) {
-        globals->set_freeze( false );
+        fgSetBool("/sim/freeze/master", false);
     }
 }