This commit is contained in:
wu58430 2023-12-04 22:47:55 +08:00
parent eb3695c804
commit d108f204d1

View file

@ -1430,24 +1430,6 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
if (UI_MENU_GetCurrentMenuId() != MENU_SCR) if (UI_MENU_GetCurrentMenuId() != MENU_SCR)
gAnotherVoiceID = MenuList[gMenuCursor].voice_id; gAnotherVoiceID = MenuList[gMenuCursor].voice_id;
#endif #endif
#if 1
if (UI_MENU_GetCurrentMenuId() == MENU_DEL_CH || UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME)
if (!RADIO_CheckValidChannel(gSubMenuSelection, false, 0))
return; // invalid channel
#endif
gAskForConfirmation = 0;
gIsInSubMenu = true;
// if (UI_MENU_GetCurrentMenuId() != MENU_D_LIST)
{
gInputBoxIndex = 0;
edit_index = -1;
}
return;
}
#ifdef ENABLE_MDC1200 #ifdef ENABLE_MDC1200
if (UI_MENU_GetCurrentMenuId() == MENU_MDC_ID) if (UI_MENU_GetCurrentMenuId() == MENU_MDC_ID)
{ {
@ -1488,6 +1470,24 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
else else
#endif #endif
#if 1
if (UI_MENU_GetCurrentMenuId() == MENU_DEL_CH || UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME)
if (!RADIO_CheckValidChannel(gSubMenuSelection, false, 0))
return; // invalid channel
#endif
gAskForConfirmation = 0;
gIsInSubMenu = true;
// if (UI_MENU_GetCurrentMenuId() != MENU_D_LIST)
{
gInputBoxIndex = 0;
edit_index = -1;
}
return;
}
if (UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME) if (UI_MENU_GetCurrentMenuId() == MENU_MEM_NAME)
{ {
if (edit_index < 0) if (edit_index < 0)