ソースを参照

Merge pull request #812 from BDisp/combobox-setfocus-fix

Fixes #811. Added a check for the subviews.
Charlie Kindel 5 年 前
コミット
ed0e70ccd2
1 ファイル変更4 行追加2 行削除
  1. 4 2
      Terminal.Gui/Views/ComboBox.cs

+ 4 - 2
Terminal.Gui/Views/ComboBox.cs

@@ -429,8 +429,10 @@ namespace Terminal.Gui {
 
 			listview.SetSource (searchset);
 			listview.Height = CalculatetHeight ();
-			
-			this.SetFocus (search);
+
+			if (Subviews.Count > 0) {
+				SetFocus (search);
+			}
 		}
 
 		private void ResetSearchSet (bool noCopy = false)