# HG changeset patch
# User Ideenmodellierer
# Date 1609792359 -3600
# Node ID fd0b60dee6f30437cf9c14e740680c4b1cb7af90
# Parent  280c11153080d0001866785c91c74a8c638a7419
Bugfix Selection of primary view:
At the begin of the dive and while switching between T7 <=> T3 view a primary view could be shown which was deactivated by the selection dialog. In case the primary view is now deactivated, the next activated view will be shown instead

diff -r 280c11153080 -r fd0b60dee6f3 Discovery/Src/motion.c
--- a/Discovery/Src/motion.c	Mon Jan 04 21:30:04 2021 +0100
+++ b/Discovery/Src/motion.c	Mon Jan 04 21:32:39 2021 +0100
@@ -240,11 +240,14 @@
 	}
 	if(settingsGetPointer()->design == 3)		/* Big font view ? */
 	{
-		sectorMap[centerView] = settingsGetPointer()->tX_customViewPrimaryBF;
+		t3_set_customview_to_primary();
+		sectorMap[centerView] = t3_change_customview(ACTION_END);
 	}
 	else
 	{
-		sectorMap[centerView] = settingsGetPointer()->tX_customViewPrimary;
+		t7_set_customview_to_primary();
+		sectorMap[centerView] = t7_change_customview(ACTION_END);
+
 	}
 
 	centerView++;
diff -r 280c11153080 -r fd0b60dee6f3 Discovery/Src/t7.c
--- a/Discovery/Src/t7.c	Mon Jan 04 21:30:04 2021 +0100
+++ b/Discovery/Src/t7.c	Mon Jan 04 21:32:39 2021 +0100
@@ -28,6 +28,7 @@
 
 /* Includes ------------------------------------------------------------------*/
 #include "t7.h"
+#include "t3.h"
 #include "settings.h"
 #include "data_exchange_main.h"
 #include "decom.h"
@@ -570,12 +571,17 @@
             last_mode = MODE_DIVE;
             /* lower left corner primary */
             selection_custom_field = settingsGetPointer()->tX_userselectedLeftLowerCornerPrimary;
-            /* custom view primary OR debug if automatic return is off */
+            /* custom view primary OR debug if automatic return is off | T7 is default dive view => also initialize big font view */
             if((settingsGetPointer()->tX_customViewTimeout == 0) && (settingsGetPointer()->showDebugInfo))
-                selection_customview = CVIEW_noneOrDebug;
+            {
+            	selection_customview = CVIEW_noneOrDebug;
+            	t3_select_customview(CVIEW_noneOrDebug);
+            }
             else
+            {
                 selection_customview = settingsGetPointer()->tX_customViewPrimary;
-
+                t3_set_customview_to_primary();
+            }
             t7_change_customview(ACTION_END);
 
             if((settingsGetPointer()->MotionDetection != MOTION_DETECT_OFF))