mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Ref T111, ignore incomplete SELCAL codes (and do not use ASSERT)
This commit is contained in:
committed by
Mathew Sutcliffe
parent
ea6cf20587
commit
d583808a4a
@@ -67,10 +67,9 @@ namespace BlackGui
|
||||
|
||||
void CSelcalCodeSelector::setSelcalCode(const QString &selcal)
|
||||
{
|
||||
if (selcal.length() == 4 && this->getSelcalCode() == selcal) return; // avoid unintended signals
|
||||
const QString s = selcal.isEmpty() ? " " : selcal.toUpper().trimmed();
|
||||
Q_ASSERT(s.length() == 4);
|
||||
if (s.length() != 4) return;
|
||||
if (s.length() != 4) { return; } // still incomplete code
|
||||
if (this->getSelcalCode() == s) { return; } // avoid unintended signals
|
||||
const QString s1 = s.left(2);
|
||||
const QString s2 = s.right(2);
|
||||
if (BlackMisc::Aviation::CSelcal::codePairs().contains(s1))
|
||||
|
||||
Reference in New Issue
Block a user