1
0
Fork 0

Bug fix from Norman Vine.

This commit is contained in:
curt 2001-04-02 21:28:35 +00:00
parent 4f7ac699e3
commit 96fbc75b7c

View file

@ -24,7 +24,7 @@
#include <Main/fg_init.hxx>
#include <Main/fg_props.hxx>
#include <Main/globals.hxx>
//#include <Time/fg_time.hxx>
#include <Scenery/tilemgr.hxx>
#include "gui.h"
#include "gui_local.hxx"
@ -86,6 +86,18 @@ void AptDialog_OK (puObject *)
SGD_RADIANS_TO_DEGREES);
BusyCursor(0);
fgReInitSubsystems();
if ( global_tile_mgr.init() ) {
// Load the local scenery data
global_tile_mgr.update(
cur_fdm_state->get_Longitude()
* SGD_RADIANS_TO_DEGREES,
cur_fdm_state->get_Latitude()
* SGD_RADIANS_TO_DEGREES );
} else {
SG_LOG( SG_GENERAL, SG_ALERT,
"Error in Tile Manager initialization!" );
exit(-1);
}
BusyCursor(1);
} else {
AptId += " not in database.";
@ -96,6 +108,7 @@ void AptDialog_OK (puObject *)
globals->set_freeze( false );
}
void AptDialog_Reset(puObject *)
{
// strncpy( NewAirportId, fgGetString("/sim/startup/airport-id").c_str(), 16 );
@ -108,7 +121,7 @@ void NewAirport(puObject *cb)
{
// strncpy( NewAirportId, fgGetString("/sim/startup/airport-id").c_str(), 16 );
sprintf( NewAirportId, "%s", fgGetString("/sim/startup/airport-id").c_str() );
// cout << "NewAirport " << NewAirportId << endl;
// cout << "NewAirport " << NewAirportId << endl;
AptDialogInput->setValue( NewAirportId );
FG_PUSH_PUI_DIALOG( AptDialog );