Count the depot consist after writing it back, not before

The stats were read off the trainset before the edit was written into it,
so the vehicle count and the rest lagged one change behind.
This commit is contained in:
maj00r
2026-10-04 18:21:08 +02:00
parent 384d8c1bca
commit 9459a21083

View File

@@ -224,9 +224,10 @@ public partial class Depot : UserControl
(_consist.SelectedCar is null || !moved.Cars.Contains(_consist.SelectedCar)))
_cards.Activate(moved);
// The stats are read off the trainset, so it is written back first.
WriteBackToScenery();
_details.Refresh();
UpdateTrainStats();
WriteBackToScenery();
// The cards are thrown away and rebuilt on every change, so a keyboard-driven
// edit has to be handed its card back or focus escapes the strip.