From b1db3a8f9752abc985355919fb2ec5c3843031bc Mon Sep 17 00:00:00 2001 From: Ross Ferguson Date: Wed, 1 Jul 2020 09:03:31 +0100 Subject: [PATCH] ComboBox wire source directly to ListView --- Terminal.Gui/Views/ComboBox.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Terminal.Gui/Views/ComboBox.cs b/Terminal.Gui/Views/ComboBox.cs index 5a6b6e243..9923c657a 100644 --- a/Terminal.Gui/Views/ComboBox.cs +++ b/Terminal.Gui/Views/ComboBox.cs @@ -49,7 +49,8 @@ namespace Terminal.Gui { if (source == null) { Source = null; } else { - Source = MakeWrapper (source); + listview.SetSource (source); + Source = listview.Source; } } @@ -106,11 +107,6 @@ namespace Terminal.Gui { SetSource (source); } - static IListDataSource MakeWrapper (IList source) - { - return new ListWrapper (source); - } - private void Initialize () { ColorScheme = Colors.Base;