浏览代码

ComboBox. Use Clear() instead of Redraw()

Ross Ferguson 5 年之前
父节点
当前提交
670595d488
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Terminal.Gui/Views/ComboBox.cs

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

@@ -380,8 +380,8 @@ namespace Terminal.Gui {
 		private void ShowList ()
 		{
 			listview.SetSource (searchset);
+			listview.Clear (); // Ensure list shrinks in Dialog as you type
 			listview.Height = CalculatetHeight ();
-			listview.Redraw (new Rect (0, 0, Bounds.Width, Bounds.Height)); // Ensure list shrinks in Dialog
 			this.SuperView?.BringSubviewToFront (this);
 		}