Update orders window when renaming/removing dispatch schedule

This commit is contained in:
Jonathan G Rennison
2023-05-13 11:54:48 +01:00
parent 2abdd27d02
commit c4fc71339a
6 changed files with 31 additions and 25 deletions

View File

@@ -105,7 +105,7 @@ static void ChangeTimetable(Vehicle *v, VehicleOrderID order_number, uint32 val,
v->orders->UpdateTotalDuration(total_delta);
v->orders->UpdateTimetableDuration(timetable_delta);
SetTimetableWindowsDirty(v, mtf == MTF_ASSIGN_SCHEDULE);
SetTimetableWindowsDirty(v, (mtf == MTF_ASSIGN_SCHEDULE) ? STWDF_SCHEDULED_DISPATCH : STWDF_NONE);
for (v = v->FirstShared(); v != nullptr; v = v->NextShared()) {
if (v->cur_real_order_index == order_number && v->current_order.Equals(*order)) {
@@ -655,7 +655,7 @@ CommandCost CmdTimetableSeparation(TileIndex tile, DoCommandFlag flags, uint32 p
}
v2->ClearSeparation();
}
SetTimetableWindowsDirty(v, true);
SetTimetableWindowsDirty(v, STWDF_SCHEDULED_DISPATCH);
}
return CommandCost();