StelMovementMgr.cpp   StelMovementMgr.cpp 
skipping to change at line 191 skipping to change at line 191
if (event->type() == QEvent::KeyPress) if (event->type() == QEvent::KeyPress)
{ {
// Direction and zoom deplacements // Direction and zoom deplacements
switch (event->key()) switch (event->key())
{ {
case Qt::Key_Left: case Qt::Key_Left:
turnLeft(true); break; turnLeft(true); break;
case Qt::Key_Right: case Qt::Key_Right:
turnRight(true); break; turnRight(true); break;
case Qt::Key_Up: case Qt::Key_Up:
if (event->modifiers().testFlag(Qt::ControlM if (event->modifiers().testFlag(Qt::ControlM
odifier)) zoomIn(true); odifier)){
else turnUp(true); zoomIn(true);
} else {
turnUp(true);
}
break; break;
case Qt::Key_Down: case Qt::Key_Down:
if (event->modifiers().testFlag(Qt::ControlM if (event->modifiers().testFlag(Qt::ControlM
odifier)) zoomOut(true); odifier)) {
else turnDown(true); zoomOut(true);
} else {
turnDown(true);
}
break; break;
case Qt::Key_PageUp: case Qt::Key_PageUp:
zoomIn(true); break; zoomIn(true); break;
case Qt::Key_PageDown: case Qt::Key_PageDown:
zoomOut(true); break; zoomOut(true); break;
case Qt::Key_Shift: case Qt::Key_Shift:
moveSlow(true); break; moveSlow(true); break;
case Qt::Key_Space: case Qt::Key_Space:
if (event->modifiers().testFlag(Qt::ControlM odifier)) if (event->modifiers().testFlag(Qt::ControlM odifier))
setDragTimeMode(true); setDragTimeMode(true);
skipping to change at line 236 skipping to change at line 242
zoomOut(false); zoomOut(false);
turnDown(false); turnDown(false);
break; break;
case Qt::Key_PageUp: case Qt::Key_PageUp:
zoomIn(false); break; zoomIn(false); break;
case Qt::Key_PageDown: case Qt::Key_PageDown:
zoomOut(false); break; zoomOut(false); break;
case Qt::Key_Shift: case Qt::Key_Shift:
moveSlow(false); break; moveSlow(false); break;
case Qt::Key_Control: case Qt::Key_Control:
// This an be all that is seen for anything
with control, so stop them all.
// This is true for 4.8.1
turnRight(false);
turnLeft(false);
zoomIn(false);
zoomOut(false);
turnDown(false);
turnUp(false);
setDragTimeMode(false); setDragTimeMode(false);
break; break;
default: default:
return; return;
} }
} }
event->accept(); event->accept();
} }
//! Handle mouse wheel events. //! Handle mouse wheel events.
skipping to change at line 584 skipping to change at line 598
} }
else else
c = std::atan(smooth * 2.*move.coef-smooth)/std::ata n(smooth)/2+0.5; c = std::atan(smooth * 2.*move.coef-smooth)/std::ata n(smooth)/2+0.5;
Vec3d tmpStart(j2000ToMountFrame(move.start)); Vec3d tmpStart(j2000ToMountFrame(move.start));
Vec3d tmpAim(j2000ToMountFrame(move.aim)); Vec3d tmpAim(j2000ToMountFrame(move.aim));
double ra_aim, de_aim, ra_start, de_start; double ra_aim, de_aim, ra_start, de_start;
StelUtils::rectToSphe(&ra_start, &de_start, tmpStart); StelUtils::rectToSphe(&ra_start, &de_start, tmpStart);
StelUtils::rectToSphe(&ra_aim, &de_aim, tmpAim); StelUtils::rectToSphe(&ra_aim, &de_aim, tmpAim);
// Make sure the position of the object to be aimed at is de
fined...
Q_ASSERT(move.aim[0]==move.aim[0] && move.aim[1]==move.aim[1
] && move.aim[2]==move.aim[2]);
// Trick to choose the good moving direction and never trave l on a distance > PI // Trick to choose the good moving direction and never trave l on a distance > PI
if (ra_aim-ra_start > M_PI) if (ra_aim-ra_start > M_PI)
{ {
ra_aim -= 2.*M_PI; ra_aim -= 2.*M_PI;
} }
else if (ra_aim-ra_start < -M_PI) else if (ra_aim-ra_start < -M_PI)
{ {
ra_aim += 2.*M_PI; ra_aim += 2.*M_PI;
} }
const double de_now = de_aim*c + de_start*(1.-c); const double de_now = de_aim*c + de_start*(1.-c);
 End of changes. 4 change blocks. 
6 lines changed or deleted 25 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/