浏览代码

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)