mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 10:05:46 -05:00
Distingush between China and Taiwan
This commit is contained in:
parent
74977c88d3
commit
abed953354
@ -457,8 +457,20 @@ QString AircraftInformation::getFlag() const
|
|||||||
{
|
{
|
||||||
// Try letters before '-'
|
// Try letters before '-'
|
||||||
prefix = m_registration.left(idx);
|
prefix = m_registration.left(idx);
|
||||||
if (m_prefixMap->contains(prefix)) {
|
// Both China and Taiwan use B prefix. China regs are <= 4 digits, with Taiwan 5
|
||||||
flag = m_prefixMap->value(prefix);
|
if (prefix == "B")
|
||||||
|
{
|
||||||
|
if (m_registration.size() >= 7) {
|
||||||
|
flag = "taiwan";
|
||||||
|
} else {
|
||||||
|
flag = "china";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (m_prefixMap->contains(prefix)) {
|
||||||
|
flag = m_prefixMap->value(prefix);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user