Fix for reset causing view problems when not in pilot view.
This commit is contained in:
parent
4da0acc346
commit
17106105bb
2 changed files with 6 additions and 1 deletions
src/Main
|
@ -642,6 +642,7 @@ void fgInitFDM() {
|
||||||
void fgInitView() {
|
void fgInitView() {
|
||||||
// force update of model so that viewer can get some data...
|
// force update of model so that viewer can get some data...
|
||||||
globals->get_aircraft_model()->update(0);
|
globals->get_aircraft_model()->update(0);
|
||||||
|
// run update for current view so that data is current...
|
||||||
globals->get_viewmgr()->update(0);
|
globals->get_viewmgr()->update(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1116,6 +1117,9 @@ void fgReInitSubsystems( void )
|
||||||
// model or control parameters are set
|
// model or control parameters are set
|
||||||
fgAircraftInit(); // In the future this might not be the case.
|
fgAircraftInit(); // In the future this might not be the case.
|
||||||
|
|
||||||
|
// copy viewer settings into current-view path
|
||||||
|
globals->get_viewmgr()->copyToCurrent();
|
||||||
|
|
||||||
fgInitView();
|
fgInitView();
|
||||||
|
|
||||||
globals->get_controls()->reset_all();
|
globals->get_controls()->reset_all();
|
||||||
|
|
|
@ -111,6 +111,8 @@ public:
|
||||||
views.push_back(v);
|
views.push_back(v);
|
||||||
v->init();
|
v->init();
|
||||||
}
|
}
|
||||||
|
// copies current offset settings to current-view path...
|
||||||
|
void copyToCurrent ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -139,7 +141,6 @@ private:
|
||||||
void setNear_m (double near_m);
|
void setNear_m (double near_m);
|
||||||
void setViewAxisLong (double axis);
|
void setViewAxisLong (double axis);
|
||||||
void setViewAxisLat (double axis);
|
void setViewAxisLat (double axis);
|
||||||
void copyToCurrent ();
|
|
||||||
|
|
||||||
typedef vector < FGViewer * > viewer_list;
|
typedef vector < FGViewer * > viewer_list;
|
||||||
viewer_list views;
|
viewer_list views;
|
||||||
|
|
Loading…
Add table
Reference in a new issue