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

Merge pull request #9373 from Asizon/fixCmsNavigation

Fix CMS Menu Navigation
This commit is contained in:
Michael Keller 2020-01-21 13:42:09 +13:00 committed by GitHub
commit f9dacff668
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)) {
currentCtx.cursorRow--;
// Skip non-title labels
if ((pageTop + currentCtx.cursorRow)->type == OME_Label && currentCtx.cursorRow > 0) {
// Skip non-title labels and strings
while (((pageTop + currentCtx.cursorRow)->type == OME_Label || (pageTop + currentCtx.cursorRow)->type == OME_String) && currentCtx.cursorRow > 0) {
currentCtx.cursorRow--;
}
if (currentCtx.cursorRow == -1 || (pageTop + currentCtx.cursorRow)->type == OME_Label) {
// Goto previous page
cmsPagePrev(pDisplay);