mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
refs #859, flight plan UI formatting and value update
This commit is contained in:
committed by
Mathew Sutcliffe
parent
5f2955916c
commit
4e7144db08
@@ -128,6 +128,8 @@ namespace BlackGui
|
||||
|
||||
void CFlightPlanComponent::prefillWithAircraftData(const BlackMisc::Simulation::CSimulatedAircraft &ownAircraft)
|
||||
{
|
||||
if (this->m_flightPlan.wasSentOrLoaded()) { return; }
|
||||
|
||||
// only override with valid values
|
||||
if (CCallsign::isValidAircraftCallsign(ownAircraft.getCallsignAsString()))
|
||||
{
|
||||
@@ -145,6 +147,7 @@ namespace BlackGui
|
||||
|
||||
void CFlightPlanComponent::prefillWithUserData(const Network::CUser &user)
|
||||
{
|
||||
if (this->m_flightPlan.wasSentOrLoaded()) { return; }
|
||||
if (user.hasValidRealName())
|
||||
{
|
||||
ui->le_PilotsName->setText(user.getRealName());
|
||||
@@ -153,6 +156,10 @@ namespace BlackGui
|
||||
{
|
||||
ui->le_PilotsHomeBase->setText(user.getHomeBase().getIcaoCode());
|
||||
}
|
||||
if (user.hasValidCallsign())
|
||||
{
|
||||
ui->le_Callsign->setText(user.getCallsign().asString());
|
||||
}
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::fillWithFlightPlanData(const BlackMisc::Aviation::CFlightPlan &flightPlan)
|
||||
|
||||
Reference in New Issue
Block a user