mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
Add flight plan HEAVY flag depending on DB data
see https://discordapp.com/channels/539048679160676382/542130771817791516/654404036199448589
This commit is contained in:
committed by
Mat Sutcliffe
parent
091fa5f338
commit
429c91d93e
@@ -223,6 +223,14 @@ namespace BlackGui
|
||||
ui->le_AircraftType->setText(aircraft.getAircraftIcaoCodeDesignator());
|
||||
}
|
||||
m_model = aircraft.getModel();
|
||||
|
||||
if (aircraft.getAircraftIcaoCode().isLoadedFromDb() && aircraft.getAircraftIcaoCode().hasValidWtc())
|
||||
{
|
||||
const QString wtc = aircraft.getAircraftIcaoCode().getWtc().toUpper();
|
||||
const bool heavyFlag = (wtc.startsWith("H", Qt::CaseInsensitive) || wtc.startsWith("S", Qt::CaseInsensitive));
|
||||
ui->cb_Heavy->setChecked(heavyFlag);
|
||||
}
|
||||
|
||||
this->prefillWithUserData(aircraft.getPilot());
|
||||
this->buildPrefixIcaoSuffix();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user