From 5250e0765a5e8c018679c28327d5475479301f0d Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 1 Jul 2015 17:38:18 +0000 Subject: [PATCH] Only one text window in WSPR and Echo modes, even if "Show DXCC" is enabled. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5651 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/wsprd/wsprd_exp.c | 6 ++++-- mainwindow.cpp | 24 ++++++++---------------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/lib/wsprd/wsprd_exp.c b/lib/wsprd/wsprd_exp.c index f3ef8f68c..49ac8c554 100644 --- a/lib/wsprd/wsprd_exp.c +++ b/lib/wsprd/wsprd_exp.c @@ -845,8 +845,10 @@ int main(int argc, char *argv[]) } int npk=0; - for(j=1; j<410; j++) { - if((smspec[j]>smspec[j-1]) && (smspec[j]>smspec[j+1]) && (npk<200)) { + // for(j=1; j<410; j++) { + // if((smspec[j]>smspec[j-1]) && (smspec[j]>smspec[j+1]) && (npk<200)) { + for(j=1; j<410; j=j+2) { + if((smspec[j]>min_snr) && (npk<200)) { freq0[npk]=(j-205)*df; snr0[npk]=10*log10(smspec[j])-snr_scaling_factor; npk++; diff --git a/mainwindow.cpp b/mainwindow.cpp index 398e5f594..736a68160 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -3330,22 +3330,14 @@ void MainWindow::band_changed (Frequency f) void MainWindow::enable_DXCC_entity (bool on) { - if (on) - { - // re-read the log and cty.dat files - m_logBook.init(); - } - - if (on) // adjust the proportions between the two text displays - { - ui->gridLayout->setColumnStretch(0,55); - ui->gridLayout->setColumnStretch(1,45); - } - else - { - ui->gridLayout->setColumnStretch(0,0); - ui->gridLayout->setColumnStretch(1,0); - } + if (on and m_mode.mid(0,4)!="WSPR" and m_mode!="Echo") { + m_logBook.init(); // re-read the log and cty.dat files + ui->gridLayout->setColumnStretch(0,55); // adjust proportions of text displays + ui->gridLayout->setColumnStretch(1,45); + } else { + ui->gridLayout->setColumnStretch(0,0); + ui->gridLayout->setColumnStretch(1,0); + } } void MainWindow::on_pbCallCQ_clicked()