diff --git a/mainwindow.cpp b/mainwindow.cpp index e563ada..1a6c4af 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -5339,6 +5339,7 @@ void MainWindow::clearActivity(){ m_bandActivity.clear(); m_callActivity.clear(); m_callSeenBeacon.clear(); + m_compoundCallCache.clear(); m_rxCallCache.clear(); m_rxRecentCache.clear(); m_rxDirectedCache.clear(); @@ -5515,7 +5516,7 @@ void MainWindow::on_extFreeTextMsgEdit_currentTextChanged (QString const& text) ui->extFreeTextMsgEdit->setTextCursor(c); } - int count = buildFT8MessageFrames(x).first.length(); + int count = countFT8MessageFrames(x); if(count > 0){ ui->startTxButton->setText(QString("Send (%1)").arg(count)); ui->startTxButton->setEnabled(true); @@ -5525,21 +5526,14 @@ void MainWindow::on_extFreeTextMsgEdit_currentTextChanged (QString const& text) } } -QString trimWithPeriods(QString value){ - QRegularExpression re("^\\s+"); - auto match = re.match(value); - if(match.hasMatch()){ - int count = match.captured(0).length(); - return value.replace(0, count, QString(".").repeated(count)); - } - - return value; -} - int MainWindow::currentFreq(){ return ui->RxFreqSpinBox->value(); } +int MainWindow::countFT8MessageFrames(QString const& text){ + return buildFT8MessageFrames(text).first.length(); +} + QPair MainWindow::buildFT8MessageFrames(QString const& text){ QStringList frames; QStringList lines; diff --git a/mainwindow.h b/mainwindow.h index 4e320ab..b2fe1d1 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -254,6 +254,7 @@ private slots: void on_extFreeTextMsg_currentTextChanged (QString const&); void on_extFreeTextMsgEdit_currentTextChanged (QString const&); int currentFreq(); + int countFT8MessageFrames(QString const& text); QPair buildFT8MessageFrames(QString const& text); QString parseFT8Message(QString input, bool *isFree); bool prepareNextMessageFrame();