UI: Fix bug causing frequency not being saved when switching from VFO to MEM

This commit is contained in:
Federico Amedeo Izzo 2021-01-26 20:42:59 +01:00
parent 4d35ddfa3d
commit c4e7e2962c
1 changed files with 2 additions and 2 deletions

View File

@ -583,12 +583,12 @@ void ui_updateFSM(event_t event, bool *sync_rtx)
}
else if(msg.keys & KEY_ESC)
{
// Save VFO channel
state.vfo_channel = state.channel;
int result = _ui_fsm_loadChannel(state.channel_index, sync_rtx);
// Read successful and channel is valid
if(result != -1)
{
// Save VFO channel
state.vfo_channel = state.channel;
// Switch to MEM screen
state.ui_screen = MAIN_MEM;
}