From f224068ec1bdef7c13fe72734553ab44bfb3b3f5 Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Wed, 18 Jan 2023 19:19:48 +0000 Subject: [PATCH] Fix LSB passband resize --- wfmain.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/wfmain.cpp b/wfmain.cpp index 0b35283..6ced157 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -4740,10 +4740,19 @@ void wfmain::handlePlotMouseMove(QMouseEvent *me) else if (passbandAction == passbandResizing) { // We are currently resizing the passband. double pb = 0.0; - double origin = passbandCenterFrequency; - if (currentModeInfo.mk == modeCW || currentModeInfo.mk == modeCW_R) + double origin = 0.0; + switch (currentModeInfo.mk) { + case modeCW: + case modeCW_R: origin = 0.0; + break; + case modeLSB: + origin = -passbandCenterFrequency; + break; + default: + origin = passbandCenterFrequency; + break; } if (plot->xAxis->pixelToCoord(me->pos().x()) >= freq.MHzDouble + origin) { @@ -4902,6 +4911,9 @@ void wfmain::receiveMode(unsigned char mode, unsigned char filter) removePeriodicCommand(cmdGetRttyMark); break; default: + removePeriodicCommand(cmdGetCwPitch); + removePeriodicCommand(cmdGetPskTone); + removePeriodicCommand(cmdGetRttyMark); passbandCenterFrequency = 0.0; break; }