LocationDialog.cpp   LocationDialog.cpp 
skipping to change at line 373 skipping to change at line 373
setFieldsFromLocation(loc); setFieldsFromLocation(loc);
StelApp::getInstance().getCore()->moveObserverTo(loc, 0.); StelApp::getInstance().getCore()->moveObserverTo(loc, 0.);
} }
// Called when the planet name is changed by hand // Called when the planet name is changed by hand
void LocationDialog::moveToAnotherPlanet(const QString&) void LocationDialog::moveToAnotherPlanet(const QString&)
{ {
reportEdit(); reportEdit();
StelLocation loc = locationFromFields(); StelLocation loc = locationFromFields();
StelCore* stelCore = StelApp::getInstance().getCore(); StelCore* stelCore = StelApp::getInstance().getCore();
LandscapeMgr* ls = GETSTELMODULE(LandscapeMgr);
if (loc.planetName != stelCore->getCurrentLocation().planetName) if (loc.planetName != stelCore->getCurrentLocation().planetName)
{
setFieldsFromLocation(loc); setFieldsFromLocation(loc);
stelCore->moveObserverTo(loc, 0.); // If we have a landscape for selected planet then set it, o
therwise use default landscape
// Details: https://bugs.launchpad.net/stellarium/+bug/11732
54
if (ls->getAllLandscapeNames().indexOf(loc.planetName)>0)
ls->setCurrentLandscapeName(loc.planetName);
else
ls->setCurrentLandscapeID(ls->getDefaultLandscapeID(
));
}
// Planet transition time also set to null to prevent uglyness when
// "use landscape location" is enabled for that planet's landscape.
--BM
// NOTE: I think it also makes sense in the other cases. --BM
// FIXME: Avoid the unnecessary change of the location anyway. --BM
stelCore->moveObserverTo(loc, 0., 0.);
} }
void LocationDialog::setPositionFromCoords(int ) void LocationDialog::setPositionFromCoords(int )
{ {
reportEdit(); reportEdit();
StelLocation loc = locationFromFields(); StelLocation loc = locationFromFields();
StelApp::getInstance().getCore()->moveObserverTo(loc, 0.); StelApp::getInstance().getCore()->moveObserverTo(loc, 0.);
//Update the position of the map pointer //Update the position of the map pointer
ui->mapLabel->setCursorPos(loc.longitude, loc.latitude); ui->mapLabel->setCursorPos(loc.longitude, loc.latitude);
} }
 End of changes. 3 change blocks. 
1 lines changed or deleted 19 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/