Fixed issue with older version of qt.

half-duplex
Elliott Liggett 2023-01-23 20:56:17 -08:00
rodzic 9c3ca568ed
commit 68ed3dc56b
1 zmienionych plików z 16 dodań i 0 usunięć

Wyświetl plik

@ -4486,7 +4486,11 @@ void wfmain::receiveSpectrumData(QByteArray spectrum, double startFreq, double e
if ((plotFloor != oldPlotFloor) || (plotCeiling != oldPlotCeiling)){
updateRange = true;
}
#if QCUSTOMPLOT_VERSION < 0x020000
plot->graph(0)->setData(x, y);
#else
plot->graph(0)->setData(x, y, true);
#endif
if((freq.MHzDouble < endFreq) && (freq.MHzDouble > startFreq))
{
@ -4552,14 +4556,26 @@ void wfmain::receiveSpectrumData(QByteArray spectrum, double startFreq, double e
if (underlayMode == underlayPeakHold)
{
#if QCUSTOMPLOT_VERSION < 0x020000
plot->graph(1)->setData(x, y2); // peaks
#else
plot->graph(1)->setData(x, y2, true); // peaks
#endif
}
else if (underlayMode != underlayNone) {
computePlasma();
#if QCUSTOMPLOT_VERSION < 0x020000
plot->graph(1)->setData(x, spectrumPlasmaLine);
#else
plot->graph(1)->setData(x, spectrumPlasmaLine, true);
#endif
}
else {
#if QCUSTOMPLOT_VERSION < 0x020000
plot->graph(1)->setData(x, y2); // peaks, but probably cleared out
#else
plot->graph(1)->setData(x, y2, true); // peaks, but probably cleared out
#endif
}
if(updateRange)