Scheduled dispatch: Show start date button as start time when using minutes

This commit is contained in:
Jonathan G Rennison
2024-01-23 17:45:32 +00:00
parent 39e7a9252c
commit 628106d182
2 changed files with 6 additions and 0 deletions

View File

@@ -338,6 +338,10 @@ struct SchdispatchWindow : GeneralVehicleWindow {
this->SetWidgetDisabledState(WID_SCHDISPATCH_MANAGEMENT, disabled);
this->SetWidgetDisabledState(WID_SCHDISPATCH_ADJUST, disabled || this->GetSelectedSchedule().GetScheduledDispatch().empty());
NWidgetCore *start_date_widget = this->GetWidget<NWidgetCore>(WID_SCHDISPATCH_SET_START_DATE);
start_date_widget->widget_data = _settings_time.time_in_minutes ? STR_SCHDISPATCH_START_TIME : STR_SCHDISPATCH_START;
start_date_widget->tool_tip = _settings_time.time_in_minutes ? STR_SCHDISPATCH_SET_START_TIME : STR_SCHDISPATCH_SET_START;
this->vscroll->SetCount(CeilDiv(this->item_count, this->num_columns));
this->SetWidgetLoweredState(WID_SCHDISPATCH_ENABLED, HasBit(v->vehicle_flags, VF_SCHEDULED_DISPATCH));