From 5de4baa9bc5961f904d837a0849fb2181e99a625 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 1 Mar 2013 14:49:26 +0000 Subject: [PATCH] Set fQSO as well as TxFreq when decoded text line is double-clicked. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3026 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 14e9ef679..fdfd1c752 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1255,8 +1255,10 @@ void MainWindow::on_txb6_clicked() //txb6 void MainWindow::doubleClickOnCall(bool ctrl) { + QTextCursor cursor=ui->decodedTextBrowser->textCursor(); + cursor.select(QTextCursor::LineUnderCursor); + int i2=cursor.position(); QString t = ui->decodedTextBrowser->toPlainText(); //Full contents - int i2=ui->decodedTextBrowser->textCursor().position(); QString t1 = t.mid(0,i2); //contents up to \n on selected line int i1=t1.lastIndexOf("\n") + 1; //points to first char of line QString t2 = t1.mid(i1,i2-i1); //selected line @@ -1264,7 +1266,9 @@ void MainWindow::doubleClickOnCall(bool ctrl) if(i4>60) i4=60; QString t3=t.mid(i1,i4); QStringList t4=t3.split(" ",QString::SkipEmptyParts); - ui->TxFreqSpinBox->setValue(int(t4.at(4).toFloat())); + int nfreq=int(t4.at(4).toFloat()); + ui->TxFreqSpinBox->setValue(nfreq); + g_pWideGraph->setQSOfreq(nfreq); QString hiscall=t4.at(7); ui->dxCallEntry->setText(hiscall); int n = 60*t2.mid(0,2).toInt() + t2.mid(2,2).toInt();