Corrected deserializing of bandwidth and low cutoff

This commit is contained in:
f4exb 2015-10-09 08:55:22 +02:00
parent 76a60a8cb2
commit 9cd0639fed
1 changed files with 8 additions and 6 deletions

View File

@ -106,7 +106,7 @@ bool ChannelAnalyzerGUI::deserialize(const QByteArray& data)
{ {
QByteArray bytetmp; QByteArray bytetmp;
quint32 u32tmp; quint32 u32tmp;
qint32 tmp; qint32 tmp, bw, lowCut;
bool tmpBool; bool tmpBool;
blockApplySettings(true); blockApplySettings(true);
@ -114,8 +114,8 @@ bool ChannelAnalyzerGUI::deserialize(const QByteArray& data)
d.readS32(1, &tmp, 0); d.readS32(1, &tmp, 0);
m_channelMarker.setCenterFrequency(tmp); m_channelMarker.setCenterFrequency(tmp);
d.readS32(2, &tmp, 30); d.readS32(2, &bw, 30);
ui->BW->setValue(tmp); ui->BW->setValue(bw);
d.readBlob(3, &bytetmp); d.readBlob(3, &bytetmp);
ui->spectrumGUI->deserialize(bytetmp); ui->spectrumGUI->deserialize(bytetmp);
@ -124,8 +124,8 @@ bool ChannelAnalyzerGUI::deserialize(const QByteArray& data)
m_channelMarker.setColor(u32tmp); m_channelMarker.setColor(u32tmp);
} }
d.readS32(5, &tmp, 3); d.readS32(5, &lowCut, 3);
ui->lowCut->setValue(tmp); ui->lowCut->setValue(lowCut);
d.readS32(6, &tmp, 20); d.readS32(6, &tmp, 20);
ui->spanLog2->setValue(tmp); ui->spanLog2->setValue(tmp);
setNewRate(tmp); setNewRate(tmp);
@ -137,7 +137,9 @@ bool ChannelAnalyzerGUI::deserialize(const QByteArray& data)
blockApplySettings(false); blockApplySettings(false);
m_channelMarker.blockSignals(false); m_channelMarker.blockSignals(false);
applySettings(); ui->BW->setValue(bw);
ui->lowCut->setValue(lowCut); // does applySettings();
return true; return true;
} }
else else