Skip to content

Commit a172c1d

Browse files
committed
Fix Type to only show the name not full namespace
1 parent f3b6216 commit a172c1d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/UI/Windows/BigListBox.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public BigListBox(
9090
this.collection = this.BuildList(this.GetInitialSource()).ToList();
9191

9292
this.listView.SetSource(
93-
new ObservableCollection<T>(this.collection.Select(o=>o.Object).ToArray())
93+
new ObservableCollection<ListViewObject<T>>(this.collection.ToArray())
9494
);
9595
this.win.Add(this.listView);
9696

src/UI/Windows/Modals.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ internal static bool GetString(string windowTitle, string entryLabel, string? in
138138

139139
internal static bool Get<T>(string prompt, string okText, T[] collection, T? currentSelection, out T? selected)
140140
{
141-
return Get(prompt, okText, true, collection, o => o?.ToString() ?? "Null", false, currentSelection, out selected);
141+
return Get(prompt, okText, true, collection, o => o is Type t ? t.Name : o?.ToString() ?? "Null", false, currentSelection, out selected);
142142
}
143143

144144
internal static bool Get<T>( string prompt, string okText, in bool addSearch, T[] collection, Func<T?, string> displayMember, bool addNull, [NotNullWhen( true )]T? currentSelection, [NotNullWhen( true )] out T? selected )

0 commit comments

Comments
 (0)