mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
Ref T637, allow 3 letter ICAOs in FP
* strict or lenient airport check * allow to enter 3 letter ICAO codes in FP
This commit is contained in:
@@ -399,6 +399,14 @@ namespace BlackGui
|
||||
else
|
||||
{
|
||||
flightPlan.setDestinationAirportIcao(v);
|
||||
if (strict && !flightPlan.getDestinationAirportIcao().hasValidIcaoCode(true))
|
||||
{
|
||||
messages.push_back(CStatusMessage(this).validationError(u"Invalid destination ICAO code '%1'") << v);
|
||||
}
|
||||
else if (!flightPlan.getDestinationAirportIcao().hasValidIcaoCode(false))
|
||||
{
|
||||
messages.push_back(CStatusMessage(this).validationWarning(u"Wrong or missing '%1'") << ui->lbl_DestinationAirport->text());
|
||||
}
|
||||
}
|
||||
|
||||
// origin airport
|
||||
@@ -411,6 +419,14 @@ namespace BlackGui
|
||||
else
|
||||
{
|
||||
flightPlan.setOriginAirportIcao(v);
|
||||
if (strict && !flightPlan.getOriginAirportIcao().hasValidIcaoCode(true))
|
||||
{
|
||||
messages.push_back(CStatusMessage(this).validationError(u"Invalid origin ICAO code '%1'") << v);
|
||||
}
|
||||
else if (!flightPlan.getOriginAirportIcao().hasValidIcaoCode(false))
|
||||
{
|
||||
messages.push_back(CStatusMessage(this).validationWarning(u"Wrong or missing '%1'") << ui->lbl_DestinationAirport->text());
|
||||
}
|
||||
}
|
||||
|
||||
// TAS
|
||||
|
||||
Reference in New Issue
Block a user