mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 03:15:34 +08:00
Do NOT override METAR if user "manually entered some arbitrary callsign"
See https://discordapp.com/channels/539048679160676382/539486309882789888/621787641976717323
This commit is contained in:
@@ -249,9 +249,17 @@ namespace BlackGui
|
||||
else if (!m_selectedCallsign.isEmpty() && onlineStations.containsCallsign(m_selectedCallsign))
|
||||
{
|
||||
const CAtcStation lastSelected = onlineStations.findFirstByCallsign(m_selectedCallsign);
|
||||
if (lastSelected.hasCallsign())
|
||||
{
|
||||
// avoid override of manually entered METAR callsigns
|
||||
const CCallsign currentCs(ui->le_AtcStationsOnlineMetar->text());
|
||||
if (currentCs.isEmpty() || currentCs == lastSelected.getCallsign())
|
||||
{
|
||||
this->triggerOnlineAtcStationSelected(lastSelected);
|
||||
}
|
||||
}
|
||||
} // stations
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -474,6 +482,7 @@ namespace BlackGui
|
||||
(station.hasAtis() ? u"\n\n" % station.getAtis().getMessage() : QStringLiteral("")) %
|
||||
(station.hasMetar() ? u"\n\n" % station.getMetar().getMessage() : QStringLiteral(""));
|
||||
ui->te_AtcStationsOnlineInfo->setText(infoMessage);
|
||||
ui->le_AtcStationsOnlineMetar->setText(station.getCallsign().asString());
|
||||
m_selectedCallsign = station.getCallsign();
|
||||
}
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
<string extracomment="METAR: Airport ICAO code">METAR: Airport ICAO code</string>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>5</number>
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>e.g. KLAX</string>
|
||||
|
||||
Reference in New Issue
Block a user