Show vehicle and texture info when a browser entry is picked

The General and About texture tabs only ever described the selected consist car,
so clicking a vehicle in the list told the user nothing about it.
This commit is contained in:
maj00r
2026-09-04 22:29:04 +02:00
parent df21ec104f
commit b9f455e33d
4 changed files with 33 additions and 0 deletions

View File

@@ -49,6 +49,8 @@ public sealed class VehicleBrowser
public VehicleTexture? Selected { get; private set; }
public Action<VehicleTexture>? TextureSelected { get; set; }
private bool _suppress;
private bool _syncingCombos;
@@ -342,6 +344,11 @@ public sealed class VehicleBrowser
miniPreview.Source = _minis.Get(_db.ResolveMiniName(texture), MiniPreviewHeight);
addVehicleButton.IsEnabled = true;
SyncCombosTo(texture);
// Clicking a card in the consist also selects its texture here. The
// detail panels then belong to that car, not to the catalogue entry.
if (!_syncingCombos)
TextureSelected?.Invoke(texture);
}
else
{