Bug fix from Norman Vine.
This commit is contained in:
parent
4f7ac699e3
commit
96fbc75b7c
1 changed files with 84 additions and 71 deletions
|
@ -24,7 +24,7 @@
|
||||||
#include <Main/fg_init.hxx>
|
#include <Main/fg_init.hxx>
|
||||||
#include <Main/fg_props.hxx>
|
#include <Main/fg_props.hxx>
|
||||||
#include <Main/globals.hxx>
|
#include <Main/globals.hxx>
|
||||||
//#include <Time/fg_time.hxx>
|
#include <Scenery/tilemgr.hxx>
|
||||||
|
|
||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
#include "gui_local.hxx"
|
#include "gui_local.hxx"
|
||||||
|
@ -86,6 +86,18 @@ void AptDialog_OK (puObject *)
|
||||||
SGD_RADIANS_TO_DEGREES);
|
SGD_RADIANS_TO_DEGREES);
|
||||||
BusyCursor(0);
|
BusyCursor(0);
|
||||||
fgReInitSubsystems();
|
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);
|
BusyCursor(1);
|
||||||
} else {
|
} else {
|
||||||
AptId += " not in database.";
|
AptId += " not in database.";
|
||||||
|
@ -96,6 +108,7 @@ void AptDialog_OK (puObject *)
|
||||||
globals->set_freeze( false );
|
globals->set_freeze( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AptDialog_Reset(puObject *)
|
void AptDialog_Reset(puObject *)
|
||||||
{
|
{
|
||||||
// strncpy( NewAirportId, fgGetString("/sim/startup/airport-id").c_str(), 16 );
|
// 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 );
|
// strncpy( NewAirportId, fgGetString("/sim/startup/airport-id").c_str(), 16 );
|
||||||
sprintf( NewAirportId, "%s", fgGetString("/sim/startup/airport-id").c_str() );
|
sprintf( NewAirportId, "%s", fgGetString("/sim/startup/airport-id").c_str() );
|
||||||
// cout << "NewAirport " << NewAirportId << endl;
|
// cout << "NewAirport " << NewAirportId << endl;
|
||||||
AptDialogInput->setValue( NewAirportId );
|
AptDialogInput->setValue( NewAirportId );
|
||||||
|
|
||||||
FG_PUSH_PUI_DIALOG( AptDialog );
|
FG_PUSH_PUI_DIALOG( AptDialog );
|
||||||
|
|
Loading…
Reference in a new issue