Added warning message about empty callsign before transmitting
This commit is contained in:
		
							parent
							
								
									bc97c96a5b
								
							
						
					
					
						commit
						5f4a66e916
					
				| @ -5776,7 +5776,20 @@ void MainWindow::resetMessageUI(){ | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| bool MainWindow::ensureCallsignSet(){ | ||||
|     if(m_config.my_callsign().trimmed().isEmpty()){ | ||||
|         MessageBox::warning_message(this, tr ("Please enter your callsign in the settings.")); | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     return true; | ||||
| } | ||||
| 
 | ||||
| void MainWindow::createMessage(QString const& text){ | ||||
|     if(!ensureCallsignSet()){ | ||||
|         on_stopTxButton_clicked(); | ||||
|         return; | ||||
|     } | ||||
|     resetMessageTransmitQueue(); | ||||
|     createMessageTransmitQueue(text); | ||||
| } | ||||
| @ -6309,7 +6322,7 @@ QString MainWindow::calculateDistance(QString const& value) | ||||
| // this function is called by auto_tx_mode, which is called by autoButton.clicked
 | ||||
| void MainWindow::on_startTxButton_toggled(bool checked) | ||||
| { | ||||
|     if(checked){ | ||||
|     if(checked){        | ||||
|         createMessage(ui->extFreeTextMsgEdit->toPlainText()); | ||||
|         startTx(); | ||||
|     } else { | ||||
|  | ||||
| @ -140,6 +140,7 @@ public slots: | ||||
|   void resetMessage(); | ||||
|   void resetMessageUI(); | ||||
|   void restoreMessage(); | ||||
|   bool ensureCallsignSet(); | ||||
|   void createMessage(QString const& text); | ||||
|   void createMessageTransmitQueue(QString const& text); | ||||
|   void resetMessageTransmitQueue(); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Jordan Sherer
						Jordan Sherer