Explorar el Código

Fixes #3424. v1 - Views should not force focus if they are not selected.

BDisp hace 1 año
padre
commit
2ba162405e
Se han modificado 2 ficheros con 5 adiciones y 1 borrados
  1. 1 1
      Terminal.Gui/Views/ComboBox.cs
  2. 4 0
      Terminal.Gui/Windows/Wizard.cs

+ 1 - 1
Terminal.Gui/Views/ComboBox.cs

@@ -792,7 +792,7 @@ namespace Terminal.Gui {
 			listview.SetSource (searchset);
 			listview.SetSource (searchset);
 			listview.Height = CalculatetHeight ();
 			listview.Height = CalculatetHeight ();
 
 
-			if (Subviews.Count > 0) {
+			if (HasFocus && Subviews.Count > 0) {
 				search.SetFocus ();
 				search.SetFocus ();
 			}
 			}
 		}
 		}

+ 4 - 0
Terminal.Gui/Windows/Wizard.cs

@@ -773,6 +773,10 @@ namespace Terminal.Gui {
 			var oldStep = currentStep;
 			var oldStep = currentStep;
 			currentStep = newStep;
 			currentStep = newStep;
 
 
+			if (currentStep is null) {
+				return false;
+			}
+
 			UpdateButtonsAndTitle ();
 			UpdateButtonsAndTitle ();
 
 
 			// Set focus to the nav buttons
 			// Set focus to the nav buttons