From 556f5acab05891b24af3fc4f4af88bd805361631 Mon Sep 17 00:00:00 2001 From: Julian Sebline Date: Sat, 18 Jun 2022 21:50:49 +0200 Subject: [PATCH] Fix previous commit --- src/instruments/src/RMP/Components/NavRadioPanel.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/instruments/src/RMP/Components/NavRadioPanel.tsx b/src/instruments/src/RMP/Components/NavRadioPanel.tsx index 1751b0e243c..8ce8789457e 100644 --- a/src/instruments/src/RMP/Components/NavRadioPanel.tsx +++ b/src/instruments/src/RMP/Components/NavRadioPanel.tsx @@ -100,6 +100,7 @@ export const NavRadioPanel = (props: Props) => { } const [mode, setMode] = useState(Mode.FREQUENCY); + const [currentTransceiver, setCurrentTransceiver] = useState(props.transceiver); const [activeFrequency, setActiveFrequencySaved] = useActiveFrequency(props.transceiver, props.side); const [standbyFrequency, setStandbyFrequencySaved] = useStandbyFrequency(props.transceiver, props.side); @@ -125,6 +126,11 @@ export const NavRadioPanel = (props: Props) => { } }); + if (currentTransceiver !== props.transceiver) { + setMode(Mode.FREQUENCY); + setCurrentTransceiver(props.transceiver); + } + if (mode === Mode.FREQUENCY) { standbyWindow = ; } else {