Fix double-click on call.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2686 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-10-24 19:44:29 +00:00
parent 95ef647de5
commit 5a64719447
3 changed files with 21 additions and 12 deletions

View File

@ -51,8 +51,10 @@ subroutine decoder(ntrSeconds,c0)
rewind 13 rewind 13
! write(*,1010) nutc,sync,xdt,1000.0+fpk,msg ! write(*,1010) nutc,sync,xdt,1000.0+fpk,msg
nsync=sync nsync=sync
write(13,1010) nutc,nsync,snr,xdt,1000.0+fpk,msg nsnr=nint(snr)
1010 format(i4.4,i4,f7.1,f6.1,f8.1,3x,a22,e12.3) width=0.0
write(13,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width,msg
1010 format(i4.4,i4,i5,f6.1,f8.2,f6.2,3x,a22)
call flush(13) call flush(13)
close(13) close(13)

View File

@ -1095,16 +1095,23 @@ void MainWindow::doubleClickOnCall(QString hiscall, bool ctrl)
ui->dxCallEntry->setText(hiscall); ui->dxCallEntry->setText(hiscall);
QString t = ui->decodedTextBrowser->toPlainText(); //Full contents QString t = ui->decodedTextBrowser->toPlainText(); //Full contents
int i2=ui->decodedTextBrowser->textCursor().position(); int i2=ui->decodedTextBrowser->textCursor().position();
QString t1 = t.mid(0,i2); //contents up to text cursor int i3=t.mid(i2,99).indexOf("\n")-1; //points to last char of line
int i1=t1.lastIndexOf("\n") + 1; QString t1 = t.mid(0,i3); //contents up to \n on selected line
QString t2 = t1.mid(i1,i2-i1); //selected line int i1=t1.lastIndexOf("\n") + 1; //points to first char of line
int n = 60*t2.mid(13,2).toInt() + t2.mid(15,2).toInt(); QString t2 = t1.mid(i1,i3-i1); //selected line
m_txFirst = ((n%2) == 1); int n = 60*t2.mid(0,2).toInt() + t2.mid(2,2).toInt();
int nmod=n%(m_TRperiod/30);
m_txFirst=(nmod!=0);
ui->txFirstCheckBox->setChecked(m_txFirst); ui->txFirstCheckBox->setChecked(m_txFirst);
QString rpt=""; qDebug() << t2.mid(0,2) << t2.mid(2,2) << n << nmod << m_txFirst;
if(ctrl) rpt=t2.mid(23,3); QString rpt=t2.mid(10,3);
if(ctrl) {
int i4=t.mid(i2,20).indexOf(" ");
QString hisgrid=t.mid(i2,20).mid(i4+1,4);
ui->dxGridEntry->setText(hisgrid);
} else {
lookup(); lookup();
rpt="-30"; }
genStdMsgs(rpt); genStdMsgs(rpt);
if(t2.indexOf(m_myCall)>0) { if(t2.indexOf(m_myCall)>0) {
m_ntx=2; m_ntx=2;

View File

@ -66,7 +66,7 @@
</size> </size>
</property> </property>
<property name="title"> <property name="title">
<string> UTC Sync dB DT Freq</string> <string> UTC Sync dB DT Freq Width</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_9"> <layout class="QVBoxLayout" name="verticalLayout_9">
<item> <item>