Added automatic stopping of animation when home() is called
This commit is contained in:
@@ -198,6 +198,7 @@ void DriveManipulator::home(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
_pitch = 0.0;
|
||||
|
||||
us.requestRedraw();
|
||||
us.requestContinuousUpdate(false);
|
||||
|
||||
us.requestWarpPointer((ea.getXmin()+ea.getXmax())/2.0f,(ea.getYmin()+ea.getYmax())/2.0f);
|
||||
|
||||
@@ -362,8 +363,6 @@ bool DriveManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
{
|
||||
flushMouseEventStack();
|
||||
home(ea,us);
|
||||
us.requestRedraw();
|
||||
us.requestContinuousUpdate(false);
|
||||
return true;
|
||||
}
|
||||
else if (ea.getKey()=='q')
|
||||
|
||||
@@ -67,7 +67,7 @@ void FlightManipulator::home(const GUIEventAdapter& ea,GUIActionAdapter& us)
|
||||
_velocity = 0.0;
|
||||
|
||||
us.requestRedraw();
|
||||
|
||||
us.requestContinuousUpdate(false);
|
||||
us.requestWarpPointer((ea.getXmin()+ea.getXmax())/2.0f,(ea.getYmin()+ea.getYmax())/2.0f);
|
||||
|
||||
flushMouseEventStack();
|
||||
|
||||
@@ -50,12 +50,14 @@ void TrackballManipulator::home(double /*currentTime*/)
|
||||
{
|
||||
if (getAutoComputeHomePosition()) computeHomePosition();
|
||||
computePosition(_homeEye, _homeCenter, _homeUp);
|
||||
_thrown = false;
|
||||
}
|
||||
|
||||
void TrackballManipulator::home(const GUIEventAdapter& ea ,GUIActionAdapter& us)
|
||||
{
|
||||
home(ea.getTime());
|
||||
us.requestRedraw();
|
||||
us.requestContinuousUpdate(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -155,8 +157,6 @@ bool TrackballManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us
|
||||
flushMouseEventStack();
|
||||
_thrown = false;
|
||||
home(ea,us);
|
||||
us.requestRedraw();
|
||||
us.requestContinuousUpdate(false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -162,9 +162,12 @@ void UFOManipulator::init(const GUIEventAdapter&, GUIActionAdapter&)
|
||||
_stop();
|
||||
}
|
||||
|
||||
void UFOManipulator::home(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter&)
|
||||
void UFOManipulator::home(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us)
|
||||
{
|
||||
home(ea.getTime());
|
||||
us.requestRedraw();
|
||||
us.requestContinuousUpdate(false);
|
||||
|
||||
}
|
||||
|
||||
void UFOManipulator::home(double)
|
||||
|
||||
Reference in New Issue
Block a user