Skip to content

Commit

Permalink
Fix Type to only show the name not full namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
tznind committed Mar 2, 2025
1 parent f3b6216 commit a172c1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/UI/Windows/BigListBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public BigListBox(
this.collection = this.BuildList(this.GetInitialSource()).ToList();

this.listView.SetSource(
new ObservableCollection<T>(this.collection.Select(o=>o.Object).ToArray())
new ObservableCollection<ListViewObject<T>>(this.collection.ToArray())
);
this.win.Add(this.listView);

Expand Down
2 changes: 1 addition & 1 deletion src/UI/Windows/Modals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ internal static bool GetString(string windowTitle, string entryLabel, string? in

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

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 )
Expand Down

0 comments on commit a172c1d

Please sign in to comment.