Преглед изворни кода

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);
 		}