Prevents auto power tune from resetting attenuation to 0 by default.

Fix autotune for tx pwr on band changes to keep current level if never set.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7233 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-10-25 22:49:20 +00:00
parent dcf8521c18
commit e7237a0fa4
1 changed files with 6 additions and 1 deletions

View File

@ -4495,7 +4495,12 @@ void MainWindow::band_changed (Frequency f)
// Set the attenuation value if options are checked
QString curBand = ui->bandComboBox->currentText();
if (m_config.pwrBandTxMemory() && !m_tune) {
ui->outAttenuation->setValue(m_pwrBandTxMemory[curBand].toInt());
if (m_pwrBandTxMemory.contains(curBand)) {
ui->outAttenuation->setValue(m_pwrBandTxMemory[curBand].toInt());
}
else {
m_pwrBandTxMemory[curBand] = ui->outAttenuation->value();
}
}
if (m_bandEdited) {