diff --git a/wfmain.cpp b/wfmain.cpp index f8e38ed6..744df094 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -4566,8 +4566,15 @@ void wfmain::setRadioTimeDatePrep() if(!waitingToSetTimeDate) { // 1: Find the current time and date - QDateTime now = QDateTime::currentDateTime(); - now.setTime(QTime::currentTime()); + QDateTime now; + if(ui->useUTCChk->isChecked()) + { + now = QDateTime::currentDateTimeUtc(); + now.setTime(QTime::currentTime()); + } else { + now = QDateTime::currentDateTime(); + now.setTime(QTime::currentTime()); + } int second = now.time().second(); @@ -5505,6 +5512,11 @@ void wfmain::receiveStateInfo(rigstate* state) rigState = state; } +void wfmain::on_setClockBtn_clicked() +{ + setRadioTimeDatePrep(); +} + // --- DEBUG FUNCTION --- void wfmain::on_debugBtn_clicked() { diff --git a/wfmain.h b/wfmain.h index a22b7dc7..7c1a9f4a 100644 --- a/wfmain.h +++ b/wfmain.h @@ -506,6 +506,8 @@ private slots: void on_settingsList_currentRowChanged(int currentRow); + void on_setClockBtn_clicked(); + private: Ui::wfmain *ui; void closeEvent(QCloseEvent *event); diff --git a/wfmain.ui b/wfmain.ui index 3750d727..69277c69 100644 --- a/wfmain.ui +++ b/wfmain.ui @@ -2066,7 +2066,7 @@ - 4 + 2