diff Discovery/Src/tMenuEditCustom.c @ 750:6bd21ebe1a93

Avoid blinking in customer view selection page: In previous version a sort blink was seen when moving from one option page to the next. The root cause was the complete rebuild of the page. This is not necessary and has been replaced by just updation the label values.
author Ideenmodellierer
date Sun, 05 Mar 2023 22:17:32 +0100
parents 4a6bffaa38b3
children 70e9c83ecf22
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditCustom.c	Mon Mar 13 22:18:28 2023 +0100
+++ b/Discovery/Src/tMenuEditCustom.c	Sun Mar 05 22:17:32 2023 +0100
@@ -702,10 +702,7 @@
 	{
 		customviewsSubpage = 0;
 	}
-	resetMenuEdit(CLUT_MenuPageCustomView);				/* rebuild page */
-	openEdit_CustomviewDivemode(pcv_curchangelist);
-
-	tMenuEdit_select(StMCustom3_CViewSelection6);
+	CustomviewDivemode_refresh();
     return UPDATE_DIVESETTINGS;
 }
 
@@ -854,7 +851,24 @@
 				}
      	}
      }
-
+     for(;i<5;i++)	/* clear empty lines in case menu shows less than 5 entries */
+     {
+			switch(i)
+			{
+				case 0: 	write_label_var( 30, 800, ME_Y_LINE1, &FontT48, "");
+					break;
+				case 1:		write_label_var( 30, 800, ME_Y_LINE2, &FontT48, "");
+					break;
+				case 2: 	write_label_var( 30, 800, ME_Y_LINE3, &FontT48, "");
+					break;
+				case 3: 	write_label_var( 30, 800, ME_Y_LINE4, &FontT48, "");
+					break;
+				case 4: 	write_label_var( 30, 800, ME_Y_LINE5, &FontT48, "");
+					break;
+				default:
+					break;
+			};
+     }
      if(customviewsSubpageMax != 1)
      {
          textPointer = 0;
@@ -897,24 +911,7 @@
      {
     	 setEvent(StMCustom3_CViewSelection6,(uint32_t)OnAction_Customview_NextPage);
      }
-     for(;i<5;i++)	/* clear empty lines in case menu shows less than 5 entries */
-     {
-			switch(i)
-			{
-				case 0: 	write_label_var( 30, 800, ME_Y_LINE1, &FontT48, "");
-					break;
-				case 1:		write_label_var( 30, 800, ME_Y_LINE2, &FontT48, "");
-					break;
-				case 2: 	write_label_var( 30, 800, ME_Y_LINE3, &FontT48, "");
-					break;
-				case 3: 	write_label_var( 30, 800, ME_Y_LINE4, &FontT48, "");
-					break;
-				case 4: 	write_label_var( 30, 800, ME_Y_LINE5, &FontT48, "");
-					break;
-				default:
-					break;
-			};
-     }
+
      write_buttonTextline(TXT2BYTE_ButtonBack,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonNext);
 }