Refresh trace restrict slots window as with the train list window
This commit is contained in:
@@ -1979,6 +1979,7 @@ static void DoAcquireCompany(Company *c)
|
||||
|
||||
DeleteCompanyWindows(ci);
|
||||
InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
|
||||
InvalidateWindowClassesData(WC_TRACE_RESTRICT_SLOTS, 0);
|
||||
InvalidateWindowClassesData(WC_SHIPS_LIST, 0);
|
||||
InvalidateWindowClassesData(WC_ROADVEH_LIST, 0);
|
||||
InvalidateWindowClassesData(WC_AIRCRAFT_LIST, 0);
|
||||
|
@@ -2011,6 +2011,7 @@ bool ReadLanguagePack(const LanguageMetadata *lang)
|
||||
#endif /* ENABLE_NETWORK */
|
||||
InvalidateWindowClassesData(WC_BUILD_VEHICLE); // Build vehicle window.
|
||||
InvalidateWindowClassesData(WC_TRAINS_LIST); // Train group window.
|
||||
InvalidateWindowClassesData(WC_TRACE_RESTRICT_SLOTS);// Trace restrict slots window.
|
||||
InvalidateWindowClassesData(WC_ROADVEH_LIST); // Road vehicle group window.
|
||||
InvalidateWindowClassesData(WC_SHIPS_LIST); // Ship group window.
|
||||
InvalidateWindowClassesData(WC_AIRCRAFT_LIST); // Aircraft group window.
|
||||
|
@@ -1353,6 +1353,7 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, u
|
||||
/* We are undoubtedly changing something in the depot and train list. */
|
||||
InvalidateWindowData(WC_VEHICLE_DEPOT, src->tile);
|
||||
InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
|
||||
InvalidateWindowClassesData(WC_TRACE_RESTRICT_SLOTS, 0);
|
||||
} else {
|
||||
/* We don't want to execute what we're just tried. */
|
||||
RestoreTrainBackup(original_src);
|
||||
@@ -1437,6 +1438,7 @@ CommandCost CmdSellRailWagon(DoCommandFlag flags, Vehicle *t, uint16 data, uint3
|
||||
/* We are undoubtedly changing something in the depot and train list. */
|
||||
InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
|
||||
InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
|
||||
InvalidateWindowClassesData(WC_TRACE_RESTRICT_SLOTS, 0);
|
||||
|
||||
/* Actually delete the sold 'goods' */
|
||||
delete sell_head;
|
||||
@@ -1951,6 +1953,7 @@ CommandCost CmdReverseTrainDirection(TileIndex tile, DoCommandFlag flags, uint32
|
||||
SetWindowDirty(WC_VEHICLE_DETAILS, front->index);
|
||||
SetWindowDirty(WC_VEHICLE_VIEW, front->index);
|
||||
SetWindowClassesDirty(WC_TRAINS_LIST);
|
||||
SetWindowClassesDirty(WC_TRACE_RESTRICT_SLOTS);
|
||||
}
|
||||
} else {
|
||||
/* turn the whole train around */
|
||||
@@ -2164,6 +2167,7 @@ static bool CheckTrainStayInDepot(Train *v)
|
||||
/* force proceed was not pressed */
|
||||
if (++v->wait_counter < 37) {
|
||||
SetWindowClassesDirty(WC_TRAINS_LIST);
|
||||
SetWindowClassesDirty(WC_TRACE_RESTRICT_SLOTS);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2173,6 +2177,7 @@ static bool CheckTrainStayInDepot(Train *v)
|
||||
if (seg_state == SIGSEG_FULL || HasDepotReservation(v->tile)) {
|
||||
/* Full and no PBS signal in block or depot reserved, can't exit. */
|
||||
SetWindowClassesDirty(WC_TRAINS_LIST);
|
||||
SetWindowClassesDirty(WC_TRACE_RESTRICT_SLOTS);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
@@ -2192,6 +2197,7 @@ static bool CheckTrainStayInDepot(Train *v)
|
||||
if (seg_state == SIGSEG_PBS && !TryPathReserve(v) && v->force_proceed == TFP_NONE) {
|
||||
/* No path and no force proceed. */
|
||||
SetWindowClassesDirty(WC_TRAINS_LIST);
|
||||
SetWindowClassesDirty(WC_TRACE_RESTRICT_SLOTS);
|
||||
MarkTrainAsStuck(v);
|
||||
return true;
|
||||
}
|
||||
@@ -2201,6 +2207,7 @@ static bool CheckTrainStayInDepot(Train *v)
|
||||
|
||||
VehicleServiceInDepot(v);
|
||||
SetWindowClassesDirty(WC_TRAINS_LIST);
|
||||
SetWindowClassesDirty(WC_TRACE_RESTRICT_SLOTS);
|
||||
v->PlayLeaveStationSound();
|
||||
|
||||
v->track = TRACK_BIT_X;
|
||||
@@ -4172,6 +4179,7 @@ void Train::OnNewDay()
|
||||
|
||||
SetWindowDirty(WC_VEHICLE_DETAILS, this->index);
|
||||
SetWindowClassesDirty(WC_TRAINS_LIST);
|
||||
SetWindowClassesDirty(WC_TRACE_RESTRICT_SLOTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -48,6 +48,7 @@ void CcBuildWagon(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p
|
||||
/* put the new wagon at the end of the loco. */
|
||||
DoCommandP(0, _new_vehicle_id, found->index, CMD_MOVE_RAIL_VEHICLE);
|
||||
InvalidateWindowClassesData(WC_TRAINS_LIST, 0);
|
||||
InvalidateWindowClassesData(WC_TRACE_RESTRICT_SLOTS, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1420,6 +1420,7 @@ void VehicleEnterDepot(Vehicle *v)
|
||||
case VEH_TRAIN: {
|
||||
Train *t = Train::From(v);
|
||||
SetWindowClassesDirty(WC_TRAINS_LIST);
|
||||
SetWindowClassesDirty(WC_TRACE_RESTRICT_SLOTS);
|
||||
/* Clear path reservation */
|
||||
SetDepotReservation(t->tile, false);
|
||||
if (_settings_client.gui.show_track_reservation) MarkTileDirtyByTile(t->tile);
|
||||
@@ -2722,6 +2723,7 @@ void VehiclesYearlyLoop()
|
||||
}
|
||||
GroupStatistics::UpdateProfits();
|
||||
SetWindowClassesDirty(WC_TRAINS_LIST);
|
||||
SetWindowClassesDirty(WC_TRACE_RESTRICT_SLOTS);
|
||||
SetWindowClassesDirty(WC_SHIPS_LIST);
|
||||
SetWindowClassesDirty(WC_ROADVEH_LIST);
|
||||
SetWindowClassesDirty(WC_AIRCRAFT_LIST);
|
||||
|
@@ -1206,6 +1206,7 @@ void ChangeWindowOwner(Owner old_owner, Owner new_owner)
|
||||
case WC_FINANCES:
|
||||
case WC_STATION_LIST:
|
||||
case WC_TRAINS_LIST:
|
||||
case WC_TRACE_RESTRICT_SLOTS:
|
||||
case WC_ROADVEH_LIST:
|
||||
case WC_SHIPS_LIST:
|
||||
case WC_AIRCRAFT_LIST:
|
||||
|
Reference in New Issue
Block a user