From dc144bc0fbf0b5efb9db57e681b2e2c16403cbd9 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Fri, 28 Jul 2017 01:20:22 +0000 Subject: [PATCH] Revert "Extend grids looked up from CALL3.TXT from 4 to 6-digits if first 4 match" Bad idea, need to find a better way to extend grids to 6-digits from CALL3.TXT. This reverts commit r7959 git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7965 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 13 +++++-------- mainwindow.h | 3 +-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 72903c172..bb953c0a4 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1776,7 +1776,7 @@ void MainWindow::keyPressEvent (QKeyEvent * e) break; case Qt::Key_L: if(e->modifiers() & Qt::ControlModifier) { - lookup (true); + lookup(); genStdMsgs(m_rpt); return; } @@ -4203,7 +4203,7 @@ void MainWindow::clearDX () m_QSOProgress = CALLING; } -void MainWindow::lookup (bool extend_grid) +void MainWindow::lookup() //lookup() { QString hisCall {ui->dxCallEntry->text()}; if (!hisCall.size ()) return; @@ -4215,7 +4215,7 @@ void MainWindow::lookup (bool extend_grid) for(int i=0; i<999999; i++) { n=f.readLine(c,sizeof(c)); if(n <= 0) { - if (!extend_grid) ui->dxGridEntry->clear (); + ui->dxGridEntry->clear (); break; } QString t=QString(c); @@ -4228,10 +4228,7 @@ void MainWindow::lookup (bool extend_grid) } else { hisgrid=hisgrid.mid(0,4) + hisgrid.mid(4,2).toLower(); } - if (!ui->dxGridEntry->text ().size () - || (extend_grid && 6 == hisgrid.size () && hisgrid.left (4) == ui->dxGridEntry->text ())) { - ui->dxGridEntry->setText(hisgrid); - } + ui->dxGridEntry->setText(hisgrid); break; } } @@ -4241,7 +4238,7 @@ void MainWindow::lookup (bool extend_grid) void MainWindow::on_lookupButton_clicked() //Lookup button { - lookup (true); + lookup(); } void MainWindow::on_addButton_clicked() //Add button diff --git a/mainwindow.h b/mainwindow.h index 9ff062b2d..4404532da 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -578,8 +578,7 @@ private: void genStdMsgs(QString rpt, bool unconditional = false); void genCQMsg(); void clearDX (); - void lookup (bool extend_grid = false); // extend_grid will fetch a - // 6-digit grid if available + void lookup(); void ba2msg(QByteArray ba, char* message); void msgtype(QString t, QLineEdit* tx); void stub();