Keep a last-vehicle coupler set by hand

The back of the consist goes to 0 after every change unless its coupler was
set in the editor; a car that gets a neighbour loses that mark, so it is
freed again once it is last again.
This commit is contained in:
maj00r
2026-10-04 14:33:48 +02:00
parent 925ac87129
commit 00795513b9
9 changed files with 52 additions and 12 deletions

View File

@@ -207,6 +207,7 @@ public sealed class VehicleDetails
check.IsCheckedChanged += (_, _) =>
{
d.Coupling.Set(bit, check.IsChecked == true);
d.CouplerSetByHand = true;
_redraw();
};
Grid.SetRow(check, i / 2);
@@ -229,6 +230,7 @@ public sealed class VehicleDetails
{
if (unitIdx <= 0) return;
d.Coupling.Flags = Consist.TailCar(_consist[unitIdx - 1]).Coupling.Flags;
d.CouplerSetByHand = true;
_redraw();
Refresh();
};