Skip to content

Commit

Permalink
fix(bw): ignore short/long press of ENTER if cursor on menu line (#5404)
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
  • Loading branch information
philmoz and pfeerick committed Aug 9, 2024
1 parent 854a9bb commit 224e118
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions radio/src/gui/common/stdlcd/model_inputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ void menuModelExposAll(event_t event)
}
break;
case EVT_KEY_BREAK(KEY_ENTER):
if ((!s_currCh || (s_copyMode && !s_copyTgtOfs)) && !READ_ONLY()) {
if (sub >= 0 && (!s_currCh || (s_copyMode && !s_copyTgtOfs)) && !READ_ONLY()) {
s_copyMode = (s_copyMode == COPY_MODE ? MOVE_MODE : COPY_MODE);
s_copySrcIdx = s_currIdx;
s_copySrcCh = chn;
Expand Down Expand Up @@ -316,7 +316,7 @@ void menuModelExposAll(event_t event)
pushMenu(menuModelExpoOne);
s_copyMode = 0;
}
else {
else if (sub >= 0) {
event = 0;
s_copyMode = 0;
POPUP_MENU_START(onExposMenu, 6, STR_EDIT, STR_INSERT_BEFORE, STR_INSERT_AFTER, STR_COPY, STR_MOVE, STR_DELETE);
Expand Down
4 changes: 2 additions & 2 deletions radio/src/gui/common/stdlcd/model_mixes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ void menuModelMixAll(event_t event)
}
break;
case EVT_KEY_BREAK(KEY_ENTER):
if ((!s_currCh || (s_copyMode && !s_copyTgtOfs)) && !READ_ONLY()) {
if (sub >= 0 && (!s_currCh || (s_copyMode && !s_copyTgtOfs)) && !READ_ONLY()) {
s_copyMode = (s_copyMode == COPY_MODE ? MOVE_MODE : COPY_MODE);
s_copySrcIdx = s_currIdx;
s_copySrcCh = chn;
Expand Down Expand Up @@ -233,7 +233,7 @@ void menuModelMixAll(event_t event)
pushMenu(menuModelMixOne);
s_copyMode = 0;
}
else {
else if (sub >= 0) {
event = 0;
s_copyMode = 0;
POPUP_MENU_START(onMixesMenu, 6, STR_EDIT, STR_INSERT_BEFORE, STR_INSERT_AFTER, STR_COPY, STR_MOVE, STR_DELETE);
Expand Down

0 comments on commit 224e118

Please sign in to comment.