// force various pieces of UI into sync
onOffsetEnabledToggled(m_ui->offsetGroup->isChecked());
+ onOffsetBearingTrueChanged(m_ui->trueBearing->isChecked());
onBackToSearch();
}
bool LocationWidget::shouldStartPaused() const
{
- qWarning() << Q_FUNC_INFO << "implement me";
+ if (!m_location) {
+ return false; // defaults to on-ground at KSFO
+ }
+
+ if (FGAirport::isAirportType(m_location.ptr())) {
+ return m_ui->onFinalCheckbox->isChecked();
+ } else {
+ // navaid, start paused
+ return true;
+ }
+
return false;
}
void LocationWidget::onOffsetEnabledToggled(bool on)
{
m_ui->offsetDistanceLabel->setEnabled(on);
-// m_ui->offsetNmSpinbox->setEnabled(on);
-// m_ui->offsetBearingSpinbox->setEnabled(on);
-// m_ui->trueBearing->setEnabled(on);
-// m_ui->offsetBearingLabel->setEnabled(on);
-// m_ui->offsetDistanceLabel->setEnabled(on);
}
void LocationWidget::onAirportDiagramClicked(FGRunwayRef rwy)
QString ident = QString::fromStdString(m_location->ident()),
name = QString::fromStdString(m_location->name());
+ name = fixNavaidName(name);
+
if (locIsAirport) {
FGAirport* apt = static_cast<FGAirport*>(m_location.ptr());
QString locationOnAirport;
break;
}
- return QString("at %1 %2 (%3").arg(navaidType).arg(ident).arg(name);
+ return QString("at %1 %2 (%3)").arg(navaidType).arg(ident).arg(name);
}
return QString("Implement Me");
</layout>
</widget>
<widget class="QWidget" name="navaidPage">
- <layout class="QGridLayout" name="gridLayout_3" rowstretch="1,0,0,0,0">
+ <layout class="QGridLayout" name="gridLayout_3" rowstretch="1,0,0,0">
<property name="leftMargin">
<number>0</number>
</property>
<height>200</height>
</size>
</property>
- <zorder>offsetGroup</zorder>
</widget>
</item>
<item row="2" column="6" colspan="2">
<bool>false</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="leftMargin">
+ <number>4</number>
+ </property>
+ <property name="topMargin">
+ <number>4</number>
+ </property>
+ <property name="rightMargin">
+ <number>4</number>
+ </property>
+ <property name="bottomMargin">
+ <number>4</number>
+ </property>
<item>
<widget class="QLabel" name="offsetBearingLabel">
<property name="enabled">
setEnableDisableOptionFromCheckbox(m_ui->fetchRealWxrCheckbox, "real-weather-fetch");
setEnableDisableOptionFromCheckbox(m_ui->rembrandtCheckbox, "rembrandt");
setEnableDisableOptionFromCheckbox(m_ui->fullScreenCheckbox, "fullscreen");
- setEnableDisableOptionFromCheckbox(m_ui->startPausedCheck, "freeze");
+// setEnableDisableOptionFromCheckbox(m_ui->startPausedCheck, "freeze");
+
+ bool startPaused = m_ui->startPausedCheck->isChecked() ||
+ m_ui->location->shouldStartPaused();
+ if (startPaused) {
+ opt->addOption("enable-freeze", "");
+ }
// MSAA is more complex
if (!m_ui->rembrandtCheckbox->isChecked()) {