From d583808a4aa4692680b2b853f6b7ce385850b3d6 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Tue, 8 Aug 2017 02:34:55 +0200 Subject: [PATCH] Ref T111, ignore incomplete SELCAL codes (and do not use ASSERT) --- src/blackgui/components/selcalcodeselector.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/blackgui/components/selcalcodeselector.cpp b/src/blackgui/components/selcalcodeselector.cpp index 95aca9bbc..caacc5c2b 100644 --- a/src/blackgui/components/selcalcodeselector.cpp +++ b/src/blackgui/components/selcalcodeselector.cpp @@ -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))