StelNavigator.cpp   StelNavigator.cpp 
skipping to change at line 187 skipping to change at line 187
{ {
return position->getCurrentLocation(); return position->getCurrentLocation();
} }
// Smoothly move the observer to the given location // Smoothly move the observer to the given location
void StelNavigator::moveObserverTo(const StelLocation& target, double durat ion, double durationIfPlanetChange) void StelNavigator::moveObserverTo(const StelLocation& target, double durat ion, double durationIfPlanetChange)
{ {
double d = (getCurrentLocation().planetName==target.planetName) ? du ration : durationIfPlanetChange; double d = (getCurrentLocation().planetName==target.planetName) ? du ration : durationIfPlanetChange;
if (d>0.) if (d>0.)
{ {
SpaceShipObserver* newObs = new SpaceShipObserver(getCurrent StelLocation curLoc = getCurrentLocation();
Location(), target, d); if (position->isTraveling())
{
// Avoid using a temporary location name to create a
nother temporary one (otherwise it looks like loc1 -> loc2 -> loc3 etc..)
curLoc.name = ".";
}
SpaceShipObserver* newObs = new SpaceShipObserver(curLoc, ta
rget, d);
delete position; delete position;
position = newObs; position = newObs;
newObs->update(0); newObs->update(0);
} }
else else
{ {
delete position; delete position;
position = new StelObserver(target); position = new StelObserver(target);
} }
emit(locationChanged(target)); emit(locationChanged(target));
 End of changes. 1 change blocks. 
2 lines changed or deleted 9 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/