소스 검색

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

BDisp 1 년 전
부모
커밋
2ba162405e
2개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  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.Height = CalculatetHeight ();
 
-			if (Subviews.Count > 0) {
+			if (HasFocus && Subviews.Count > 0) {
 				search.SetFocus ();
 			}
 		}

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

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