LocationWidget::LocationWidget(QWidget *parent) :
QWidget(parent),
m_ui(new Ui::LocationWidget),
+ m_locationIsLatLon(false),
m_aircraftType(Airplane)
{
m_ui->setupUi(this);
-
QIcon historyIcon(":/history-icon");
m_ui->searchHistory->setIcon(historyIcon);
settings.value("location-lat").toDouble());
} else if (settings.contains("location-id")) {
m_location = NavDataCache::instance()->loadById(settings.value("location-id").toULongLong());
+ m_locationIsLatLon = false;
}
m_ui->altitudeSpinbox->setValue(settings.value("altitude", 6000).toInt());
QSettings settings;
settings.remove("location-id");
+ settings.remove("location-lon");
+ settings.remove("location-lat");
if (m_locationIsLatLon) {
settings.setValue("location-lat", m_geodLocation.getLatitudeDeg());
settings.setValue("location-lon", m_geodLocation.getLongitudeDeg());
void LocationWidget::setBaseLocation(FGPositionedRef ref)
{
+ m_locationIsLatLon = false;
if (m_location == ref)
return;