LocationDialog.cpp   LocationDialog.cpp 
skipping to change at line 209 skipping to change at line 209
idx = ui->planetNameComboBox->findData(QVariant("Earth"), Qt ::UserRole, Qt::MatchCaseSensitive); idx = ui->planetNameComboBox->findData(QVariant("Earth"), Qt ::UserRole, Qt::MatchCaseSensitive);
} }
ui->planetNameComboBox->setCurrentIndex(idx); ui->planetNameComboBox->setCurrentIndex(idx);
setMapForLocation(loc); setMapForLocation(loc);
// Set pointer position // Set pointer position
ui->mapLabel->setCursorPos(loc.longitude, loc.latitude); ui->mapLabel->setCursorPos(loc.longitude, loc.latitude);
ui->deleteLocationFromListPushButton->setEnabled(StelApp::getInstanc e().getLocationMgr().canDeleteUserLocation(loc.getID())); ui->deleteLocationFromListPushButton->setEnabled(StelApp::getInstanc e().getLocationMgr().canDeleteUserLocation(loc.getID()));
QSettings* conf = StelApp::getInstance().getSettings();
bool atmosphere = conf->value("landscape/flag_atmosphere", true).toB
ool();
bool fog = conf->value("landscape/flag_fog", true).toBool();
SolarSystem* ssm = GETSTELMODULE(SolarSystem); SolarSystem* ssm = GETSTELMODULE(SolarSystem);
PlanetP p = ssm->searchByEnglishName(loc.planetName); PlanetP p = ssm->searchByEnglishName(loc.planetName);
LandscapeMgr* ls = GETSTELMODULE(LandscapeMgr); LandscapeMgr* ls = GETSTELMODULE(LandscapeMgr);
ls->setFlagAtmosphere(p->hasAtmosphere()); ls->setFlagAtmosphere(p->hasAtmosphere() & atmosphere);
ls->setFlagFog(p->hasAtmosphere()); ls->setFlagFog(p->hasAtmosphere() & fog);
// Reactivate edit signals // Reactivate edit signals
connectEditSignals(); connectEditSignals();
} }
// 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())
skipping to change at line 269 skipping to change at line 272
ui->mapLabel->setPixmap(pixmap); ui->mapLabel->setPixmap(pixmap);
} }
// For caching // For caching
lastPlanet = loc.planetName; lastPlanet = loc.planetName;
lastVisionMode = StelApp::getInstance().getVisionModeNight(); lastVisionMode = StelApp::getInstance().getVisionModeNight();
} }
void LocationDialog::populatePlanetList() void LocationDialog::populatePlanetList()
{ {
Q_ASSERT(ui);
Q_ASSERT(ui->planetNameComboBox); Q_ASSERT(ui->planetNameComboBox);
QComboBox* planets = ui->planetNameComboBox; QComboBox* planets = ui->planetNameComboBox;
SolarSystem* ssystem = GETSTELMODULE(SolarSystem); SolarSystem* ssystem = GETSTELMODULE(SolarSystem);
QStringList planetNames(ssystem->getAllPlanetEnglishNames()); QStringList planetNames(ssystem->getAllPlanetEnglishNames());
//Save the current selection to be restored later //Save the current selection to be restored later
planets->blockSignals(true); planets->blockSignals(true);
int index = planets->currentIndex(); int index = planets->currentIndex();
QVariant selectedPlanetId = planets->itemData(index); QVariant selectedPlanetId = planets->itemData(index);
skipping to change at line 296 skipping to change at line 298
} }
//Restore the selection //Restore the selection
index = planets->findData(selectedPlanetId, Qt::UserRole, Qt::MatchC aseSensitive); index = planets->findData(selectedPlanetId, Qt::UserRole, Qt::MatchC aseSensitive);
planets->setCurrentIndex(index); planets->setCurrentIndex(index);
planets->model()->sort(0); planets->model()->sort(0);
planets->blockSignals(false); planets->blockSignals(false);
} }
void LocationDialog::populateCountryList() void LocationDialog::populateCountryList()
{ {
Q_ASSERT(ui);
Q_ASSERT(ui->countryNameComboBox); Q_ASSERT(ui->countryNameComboBox);
QComboBox* countries = ui->countryNameComboBox; QComboBox* countries = ui->countryNameComboBox;
QStringList countryNames(StelLocaleMgr::getAllCountryNames()); QStringList countryNames(StelLocaleMgr::getAllCountryNames());
//Save the current selection to be restored later //Save the current selection to be restored later
countries->blockSignals(true); countries->blockSignals(true);
int index = countries->currentIndex(); int index = countries->currentIndex();
QVariant selectedCountryId = countries->itemData(index); QVariant selectedCountryId = countries->itemData(index);
countries->clear(); countries->clear();
 End of changes. 4 change blocks. 
4 lines changed or deleted 6 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/