From 495170e7a19585f50e0aa2e447c94aa10ca2ea28 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 24 Jan 2024 15:10:15 -0500 Subject: [PATCH] Double-click on AS window to leave Tx Enable OFF. --- qmap/plotter.cpp | 2 ++ widgets/mainwindow.cpp | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/qmap/plotter.cpp b/qmap/plotter.cpp index 7d6150363..3ce310949 100644 --- a/qmap/plotter.cpp +++ b/qmap/plotter.cpp @@ -599,6 +599,8 @@ void CPlotter::mousePressEvent(QMouseEvent *event) //mousePressEvent int x=event->x(); int y=event->y(); int button=event->button(); +// qDebug() << "aa" << x << y << int(FreqfromX(x)+0.5) +// << floor(datcom_.fcenter) + 0.001*int(FreqfromX(x)+0.5); if(y < h+30) { // Wideband waterfall if(button==1) { setFQSO(x,false); diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index d4fbe7415..8c9a08876 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3954,7 +3954,14 @@ void MainWindow::callSandP2(int n) } setTxMsg(1); ui->txFirstCheckBox->setChecked(m_txFirst); - if (!ui->autoButton->isChecked()) ui->autoButton->click(); // Enable Tx + static qint64 ms0=0; + qint64 ms=QDateTime::currentMSecsSinceEpoch(); + if(ui->autoButton->isChecked()) { + if((ms-ms0)<=500) ui->autoButton->click(); // Disable Tx on double click + } else if((ms-ms0)>500) { + ui->autoButton->click(); // Enable Tx on single click + } + ms0=ms; if(m_transmitting) m_restart=true; }