From 6e9dc42881a49cc1eda21e2f1394beca658e7f29 Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Fri, 8 Dec 2023 18:19:42 +0100 Subject: [PATCH] Assign WAE entities to the correct DXCC when "Include extra WAE entities" is not selected. --- logbook/AD1CCty.cpp | 4 ++-- widgets/displaytext.cpp | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/logbook/AD1CCty.cpp b/logbook/AD1CCty.cpp index 526c6c8df..ef98b9366 100644 --- a/logbook/AD1CCty.cpp +++ b/logbook/AD1CCty.cpp @@ -446,8 +446,8 @@ auto AD1CCty::lookup (QString const& call) const -> Record if (p != m_->prefixes_.end ()) { impl::entity_by_id::iterator e = m_->lookup_entity (call, *p); - if ((m_->configuration_->include_WAE_entities () || !e->WAE_only_) - && (!p->exact_ || call.size () == search_prefix.size ())) + // always lookup WAE entities, we substitute them later in displaytext.cpp if "Include extra WAE entites" is not selected + if (!p->exact_ || call.size () == search_prefix.size ()) { return m_->fixup (*p, *e); } diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp index 3c72c11ee..fac88e070 100644 --- a/widgets/displaytext.cpp +++ b/widgets/displaytext.cpp @@ -387,6 +387,17 @@ QString DisplayText::appendWorkedB4 (QString message, QString call, QString cons countryName.replace ("European", "EU"); countryName.replace ("African", "AF"); + // assign WAE entities to the correct DXCC when "Include extra WAE entities" is not selected + if (!(m_config->include_WAE_entities())) { + countryName.replace ("Bear Is.", "Svalbard"); + countryName.replace ("Shetland Is.", "Scotland"); + countryName.replace ("AF Italy", "Italy"); + countryName.replace ("Sicily", "Italy"); + countryName.replace ("Vienna Intl Ctr", "Austria"); + countryName.replace ("AF Turkey", "Turkey"); + countryName.replace ("EU Turkey", "Turkey"); + } + extra += countryName; } }