فهرست منبع

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 ()
 		private void ShowList ()
 		{
 		{
 			listview.SetSource (searchset);
 			listview.SetSource (searchset);
+			listview.Clear (); // Ensure list shrinks in Dialog as you type
 			listview.Height = CalculatetHeight ();
 			listview.Height = CalculatetHeight ();
-			listview.Redraw (new Rect (0, 0, Bounds.Width, Bounds.Height)); // Ensure list shrinks in Dialog
 			this.SuperView?.BringSubviewToFront (this);
 			this.SuperView?.BringSubviewToFront (this);
 		}
 		}