comparison Discovery/Src/tMenuEditCustom.c @ 531:1721b26335f1

Bugfix custom view selection dialog: Because of missing events / menu states and not resetting the subpage index while switching between cv and bf selection, some display errors occure.
author Ideenmodellierer
date Tue, 15 Sep 2020 20:57:04 +0200
parents e221cf762f45
children 6fbf7cd391cb
comparison
equal deleted inserted replaced
530:c880907fd1d7 531:1721b26335f1
311 text = TXT2BYTE_Tissues; 311 text = TXT2BYTE_Tissues;
312 break; 312 break;
313 case CVIEW_Profile: 313 case CVIEW_Profile:
314 text = TXT2BYTE_Profile; 314 text = TXT2BYTE_Profile;
315 break; 315 break;
316 case CVIEW_Gaslist:
316 case CVIEW_T3_GasList: 317 case CVIEW_T3_GasList:
317 text = TXT2BYTE_Gaslist; 318 text = TXT2BYTE_Gaslist;
318 break; 319 break;
319 case CVIEW_EADTime: 320 case CVIEW_EADTime:
320 text = TXT2BYTE_Info; 321 text = TXT2BYTE_Info;
526 uint32_t id; 527 uint32_t id;
527 528
528 uint8_t i; 529 uint8_t i;
529 530
530 customviewsSubpageMax = (tHome_getNumberOfAvailableCVs(pcv_changelist) / CV_PER_PAGE) + 1; 531 customviewsSubpageMax = (tHome_getNumberOfAvailableCVs(pcv_changelist) / CV_PER_PAGE) + 1;
532
533 if(pcv_curchangelist != pcv_changelist) /* new selection base? => reset page index */
534 {
535 customviewsSubpage = 0;
536 }
531 pcv_curchangelist = pcv_changelist; 537 pcv_curchangelist = pcv_changelist;
532 538
533 CustomviewDivemode_refresh(pcv_changelist); 539 CustomviewDivemode_refresh(pcv_changelist);
534
535
536 text[0] = '\001';
537 text[1] = TXT_2BYTE;
538 text[2] = TXT2BYTE_SelectCustomviews;
539 text[3] = 0;
540 write_topline(text);
541 540
542 for(i=0; i<5;i++) /* fill maximum 5 items and leave last one for sub page selection */ 541 for(i=0; i<5;i++) /* fill maximum 5 items and leave last one for sub page selection */
543 { 542 {
544 textPointer = 0; 543 textPointer = 0;
545 id = pcv_changelist[customviewsSubpage * 5 + i]; 544 id = pcv_changelist[customviewsSubpage * 5 + i];
699 uint8_t textPointer = 0; 698 uint8_t textPointer = 0;
700 uint32_t id; 699 uint32_t id;
701 700
702 uint8_t i; 701 uint8_t i;
703 702
704 text[0] = '\001'; 703 text[textPointer++] = '\001';
705 text[1] = TXT_2BYTE; 704 text[textPointer++] = TXT_2BYTE;
706 text[2] = TXT2BYTE_SelectCustomviews; 705 text[textPointer++] = TXT2BYTE_SelectCustomviews;
707 text[3] = 0; 706 text[textPointer++] = ' ';
707 text[textPointer++] = '1' + customviewsSubpage;
708 text[textPointer++] = 0;
708 write_topline(text); 709 write_topline(text);
709 710
710 711
711 for(i=0; i<5;i++) /* fill maximum 5 items and leave last one for sub page selection */ 712 for(i=0; i<5;i++) /* fill maximum 5 items and leave last one for sub page selection */
712 { 713 {