From cef0ba16e54f98a3b5e76303a8f2691aa3225b2e Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 8 Feb 2018 21:12:30 +0000 Subject: [PATCH] If Fox is using a directed CQ, display hound calls only if they comply. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8484 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mainwindow.cpp b/mainwindow.cpp index c99181787..df41d7b9e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -7442,6 +7442,20 @@ void MainWindow::houndCallers() m_logBook.match(/*in*/houndCall,/*out*/countryName,callWorkedBefore,countryWorkedBefore); int i1=countryName.lastIndexOf(";"); continent=countryName.mid(i1+2,-1); + +//If we are using a directed CQ, ignore Hound calls that do not comply. + QString CQtext=ui->comboBoxCQ->currentText(); + if(CQtext.length()==5 and (continent!=CQtext.mid(3,2))) continue; + int nCallArea=-1; + if(CQtext.length()==4) { + for(int i=houndCall.length()-1; i>0; i--) { + if(houndCall.mid(i,1).toInt() > 0) nCallArea=houndCall.mid(i,1).toInt(); + if(houndCall.mid(i,1)=="0") nCallArea=0; + if(nCallArea>=0) break; + } + if(nCallArea!=CQtext.mid(3,1).toInt()) continue; + } +//This houndCall passes all tests, add it to the list. t = t + line + " " + continent + "\n"; m_nHoundsCalling++; // Number of accepted Hounds to be sorted }