1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 20:35:33 +03:00

Fix CMS Menu Navigation

This commit is contained in:
Asizon 2020-01-16 10:16:38 +01:00
parent 6433aaa688
commit 8f4880409d

View file

@ -902,11 +902,10 @@ STATIC_UNIT_TESTED uint16_t cmsHandleKey(displayPort_t *pDisplay, cms_key_e key)
if ((key == CMS_KEY_UP) && (!osdElementEditing)) { if ((key == CMS_KEY_UP) && (!osdElementEditing)) {
currentCtx.cursorRow--; currentCtx.cursorRow--;
// Skip non-title labels // Skip non-title labels and strings
if ((pageTop + currentCtx.cursorRow)->type == OME_Label && currentCtx.cursorRow > 0) { while (((pageTop + currentCtx.cursorRow)->type == OME_Label || (pageTop + currentCtx.cursorRow)->type == OME_String) && currentCtx.cursorRow > 0) {
currentCtx.cursorRow--; currentCtx.cursorRow--;
} }
if (currentCtx.cursorRow == -1 || (pageTop + currentCtx.cursorRow)->type == OME_Label) { if (currentCtx.cursorRow == -1 || (pageTop + currentCtx.cursorRow)->type == OME_Label) {
// Goto previous page // Goto previous page
cmsPagePrev(pDisplay); cmsPagePrev(pDisplay);