Introduced hint for callsign to specify callsign type (aircraft? ATC?) by context.

Background: Pilots can login in with virtually any callsign like XXX_OBS, resulting in wrong interpretations (as OBS here is no ATC station).
This commit is contained in:
Klaus Basan
2015-04-19 18:55:05 +02:00
committed by Mathew Sutcliffe
parent acec379151
commit 7b1beaf02d
11 changed files with 121 additions and 58 deletions

View File

@@ -24,6 +24,7 @@ namespace BlackMisc
: m_callsign(callsign), m_pilot(user), m_situation(situation)
{
// sync callsigns
this->m_callsign.setTypeHint(CCallsign::Aircraft);
if (!callsign.isEmpty())
{
this->setCallsign(callsign);
@@ -37,9 +38,10 @@ namespace BlackMisc
void CAircraft::setCallsign(const CCallsign &callsign)
{
this->m_callsign = callsign;
this->m_pilot.setCallsign(callsign);
this->m_situation.setCallsign(callsign);
this->m_parts.setCallsign(callsign);
this->m_callsign.setTypeHint(CCallsign::Aircraft);
this->m_pilot.setCallsign(this->m_callsign);
this->m_situation.setCallsign(this->m_callsign);
this->m_parts.setCallsign(this->m_callsign);
}
QString CAircraft::convertToQString(bool i18n) const