diff --git a/mainwindow.cpp b/mainwindow.cpp index 177a7a1..c16099d 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -5310,6 +5310,11 @@ void MainWindow::createMessage(QString const& text){ return; } + if(text.contains(" APRS:") && !m_aprsClient->isPasscodeValid()){ + MessageBox::warning_message(this, tr ("Please ensure a valid APRS passcode is set in the settings when sending an APRS packet.")); + return; + } + resetMessageTransmitQueue(); createMessageTransmitQueue(text); } diff --git a/varicode.cpp b/varicode.cpp index ea97a60..01b5ea7 100644 --- a/varicode.cpp +++ b/varicode.cpp @@ -1673,13 +1673,6 @@ QStringList Varicode::buildMessageFrames( } qDebug() << "after:" << line; } - -#if 0 - // APRS: - if(dirCmd.trimmed() == "APRS:" && !m_aprsClient->isPasscodeValid()){ - MessageBox::warning_message(this, tr ("Please enter a valid APRS passcode in the settings to send an APRS packet.")); - } -#endif } if(useDat){