# HG changeset patch # User Ideenmodellierer # Date 1598290993 -7200 # Node ID fa8b09544b3d370cc9d2a32fc052c49664791777 # Parent d78c48552f23d914c51f16026616a6a6555e16e7 Bugfix display of disabled screen. It is possible to select a screen as default which is in parallel disabled in the selection view. To avoid this the enable / disable state is not also checked when entering dive mode. The check function was depending on an ACTION. The functionality has been changed to allow the function call without ACTION. diff -r d78c48552f23 -r fa8b09544b3d Discovery/Src/t7.c --- a/Discovery/Src/t7.c Mon Aug 24 19:39:28 2020 +0200 +++ b/Discovery/Src/t7.c Mon Aug 24 19:43:13 2020 +0200 @@ -575,6 +575,7 @@ else selection_customview = settingsGetPointer()->tX_customViewPrimary; + t7_change_customview(ACTION_END); InitMotionDetection(); } @@ -1582,53 +1583,38 @@ pLastView = pViews; pViews = pCurView; - if((action == ACTION_BUTTON_ENTER) || (action == ACTION_PITCH_POS)) - { - if(*pViews < CVIEW_END) - pViews++; - - if(*pViews == CVIEW_END) - { - pViews = pStartView; - } - } - else - { - if(pViews == pStartView) - { - pViews = pLastView - 1; - } - else - { - pViews--; - } - } - do { - cv_disabled = t7_customview_disabled(*pViews); - if(cv_disabled) /* view is disabled => jump to next view */ - { - if((action == ACTION_BUTTON_ENTER) || (action == ACTION_PITCH_POS)) - { - pViews++; - if(*pViews == CVIEW_END) + switch(action) + { + case ACTION_BUTTON_ENTER: + case ACTION_PITCH_POS: + if(*pViews != CVIEW_T3_END) + pViews++; + if(*pViews == CVIEW_T3_END) { pViews = pStartView; } - } - else - { - if(pViews == pStartView) - { - pViews = pLastView - 1; - } - else - { - pViews--; - } - } - } + break; + case ACTION_PITCH_NEG: + if(pViews == pStartView) + { + pViews = pLastView - 1; + } + else + { + pViews--; + } + break; + default: + break; + } + + cv_disabled = t7_customview_disabled(*pViews); + if((cv_disabled) && (action == ACTION_END)) + { + action = ACTION_BUTTON_ENTER; + } } while(cv_disabled); selection_customview = *pViews;