LocationDialog.cpp   LocationDialog.cpp 
skipping to change at line 209 skipping to change at line 209
} }
// Update the map for the given location. // Update the map for the given location.
void LocationDialog::setMapForLocation(const StelLocation& loc) void LocationDialog::setMapForLocation(const StelLocation& loc)
{ {
// Avoids usless processing // Avoids usless processing
if (lastPlanet==loc.planetName && lastVisionMode==StelApp::getInstan ce().getVisionModeNight()) if (lastPlanet==loc.planetName && lastVisionMode==StelApp::getInstan ce().getVisionModeNight())
return; return;
QPixmap pixmap; QPixmap pixmap;
QString path;
// Try to set the proper planet map image // Try to set the proper planet map image
if (loc.planetName=="Earth") if (loc.planetName=="Earth")
{ {
// Special case for earth, we don't want to see the clouds // Special case for earth, we don't want to see the clouds
try pixmap = QPixmap(":/graphicGui/world.png");
{
path = StelFileMgr::findFile("data/gui/world.png");
}
catch (std::runtime_error& e)
{
qWarning() << "ERROR - could not find planet map for
" << loc.planetName << e.what();
return;
}
pixmap = QPixmap(path);
} }
else else
{ {
SolarSystem* ssm = GETSTELMODULE(SolarSystem); SolarSystem* ssm = GETSTELMODULE(SolarSystem);
PlanetP p = ssm->searchByEnglishName(loc.planetName); PlanetP p = ssm->searchByEnglishName(loc.planetName);
QString path;
if (p) if (p)
{ {
try try
{ {
path = StelFileMgr::findFile("textures/"+p-> getTextMapName()); path = StelFileMgr::findFile("textures/"+p-> getTextMapName());
} }
catch (std::runtime_error& e) catch (std::runtime_error& e)
{ {
qWarning() << "ERROR - could not find planet map for " << loc.planetName << e.what(); qWarning() << "ERROR - could not find planet map for " << loc.planetName << e.what();
return; return;
skipping to change at line 297 skipping to change at line 288
{ {
reportEdit(); reportEdit();
StelLocation loc = locationFromFields(); StelLocation loc = locationFromFields();
loc.latitude = latitude; loc.latitude = latitude;
loc.longitude = longitude; loc.longitude = longitude;
setFieldsFromLocation(loc); setFieldsFromLocation(loc);
StelApp::getInstance().getCore()->getNavigator()->moveObserverTo(loc , 0.); StelApp::getInstance().getCore()->getNavigator()->moveObserverTo(loc , 0.);
} }
// Called when the planet name is changed by hand // Called when the planet name is changed by hand
void LocationDialog::comboBoxChanged(const QString& text) void LocationDialog::comboBoxChanged(const QString&)
{ {
reportEdit(); reportEdit();
StelLocation loc = locationFromFields(); StelLocation loc = locationFromFields();
if (loc.planetName!=StelApp::getInstance().getCore()->getNavigator() ->getCurrentLocation().planetName) if (loc.planetName!=StelApp::getInstance().getCore()->getNavigator() ->getCurrentLocation().planetName)
setFieldsFromLocation(loc); setFieldsFromLocation(loc);
StelApp::getInstance().getCore()->getNavigator()->moveObserverTo(loc , 0.); StelApp::getInstance().getCore()->getNavigator()->moveObserverTo(loc , 0.);
} }
void LocationDialog::spinBoxChanged(int i) void LocationDialog::spinBoxChanged(int )
{ {
reportEdit(); reportEdit();
StelLocation loc = locationFromFields(); StelLocation loc = locationFromFields();
StelApp::getInstance().getCore()->getNavigator()->moveObserverTo(loc , 0.); StelApp::getInstance().getCore()->getNavigator()->moveObserverTo(loc , 0.);
} }
// Called when the location name is manually changed // Called when the location name is manually changed
void LocationDialog::locationNameChanged(const QString&) void LocationDialog::locationNameChanged(const QString&)
{ {
reportEdit(); reportEdit();
 End of changes. 5 change blocks. 
14 lines changed or deleted 4 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/