List vehicles by texture name, not thumbnail name

The list called a vehicle something no other panel used: the detail tab, the old
starter and the sort key all name it by its texture file.
This commit is contained in:
maj00r
2026-09-04 23:40:29 +02:00
parent 10523a500a
commit 5d01c8d381

View File

@@ -509,13 +509,10 @@ public sealed class VehicleBrowser
// somewhere else entirely, which is why the list looked reshuffled.
private static readonly StringComparer TextureOrder = StringComparer.CurrentCultureIgnoreCase;
private static string BrowserName(VehicleTexture texture)
{
if (!string.IsNullOrEmpty(texture.TextureMini) &&
!string.Equals(texture.TextureMini, texture.ResolvedClass, StringComparison.OrdinalIgnoreCase))
return texture.TextureMini!;
return Consist.Base(texture.Skinfile);
}
// The texture's own file name, as the old starter listed it and as the detail
// panel names it. The thumbnail name went here before, which meant the list
// called a vehicle something none of the other panels did.
private static string BrowserName(VehicleTexture texture) => Consist.Base(texture.Skinfile);
private string BrowserLabel(VehicleTexture texture, IReadOnlyList<VehicleTexture>? set)
{