diff --git a/displaytext.cpp b/displaytext.cpp index 4d7286d3b..91562a2e5 100644 --- a/displaytext.cpp +++ b/displaytext.cpp @@ -9,7 +9,7 @@ DisplayText::DisplayText(QWidget *parent) : void DisplayText::mouseDoubleClickEvent(QMouseEvent *e) { - bool ctrl = (e->modifiers() & 0x4000000); + bool ctrl = (e->modifiers() & Qt::ControlModifier); emit(selectCallsign(ctrl)); QTextBrowser::mouseDoubleClickEvent(e); } diff --git a/mainwindow.cpp b/mainwindow.cpp index c5d6acb1a..e831438e6 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -553,17 +553,16 @@ void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent void MainWindow::bumpFqso(int n) //bumpFqso() { - if((n%100)==11) { - int i=g_pWideGraph->QSOfreq(); - i--; - g_pWideGraph->setQSOfreq(i); - if(n<100) g_pWideGraph->setTxFreq(i); - } - if((n%100)==12) { - int i=g_pWideGraph->QSOfreq(); - i++; - g_pWideGraph->setQSOfreq(i); - if(n<100) g_pWideGraph->setTxFreq(i); + int i; + bool ctrl = (n>=100); + n=n%100; + i=g_pWideGraph->QSOfreq(); + if(n==11) i--; + if(n==12) i++; + g_pWideGraph->setQSOfreq(i); + if(!ctrl) { + ui->TxFreqSpinBox->setValue(i); + g_pWideGraph->setTxFreq(i); } } @@ -866,20 +865,24 @@ void MainWindow::on_DecodeButton_clicked() //Decode request void MainWindow::freezeDecode(int n) //freezeDecode() { - static int ntol[] = {1,2,5,10,20,50,100,200,500}; - if(!m_decoderBusy) { - jt9com_.newdat=0; - jt9com_.nagain=1; - int i; - if(m_mode=="JT9-1") i=4; - if(m_mode=="JT9-2") i=4; - if(m_mode=="JT9-5") i=3; - if(m_mode=="JT9-10") i=2; - if(m_mode=="JT9-30") i=1; - m_tol=ntol[i]; - g_pWideGraph->setTol(m_tol); - ui->tolSpinBox->setValue(i); - decode(); + if(n==1) { + bumpFqso(0); + } else { + static int ntol[] = {1,2,5,10,20,50,100,200,500}; + if(!m_decoderBusy) { + jt9com_.newdat=0; + jt9com_.nagain=1; + int i; + if(m_mode=="JT9-1") i=4; + if(m_mode=="JT9-2") i=4; + if(m_mode=="JT9-5") i=3; + if(m_mode=="JT9-10") i=2; + if(m_mode=="JT9-30") i=1; + m_tol=ntol[i]; + g_pWideGraph->setTol(m_tol); + ui->tolSpinBox->setValue(i); + decode(); + } } } diff --git a/plotter.cpp b/plotter.cpp index 47625e500..ed456795f 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -427,8 +427,11 @@ void CPlotter::mousePressEvent(QMouseEvent *event) //mousePressEvent { int x=event->x(); setFQSO(x,false); // Wideband waterfall - bool ctrl = (event->modifiers() & 0x4000000); - if(!ctrl) setTxFreq(m_fQSO); + bool ctrl = (event->modifiers() & Qt::ControlModifier); + if(!ctrl) { + setTxFreq(m_fQSO); + emit freezeDecode1(1); //### ??? + } } void CPlotter::mouseDoubleClickEvent(QMouseEvent *event) //mouse2click