Changeset - r28782:04cbd7c8fefa
[Not reviewed]
master
0 1 0
Peter Nelson - 10 months ago 2024-02-18 12:20:11
peter1138@openttd.org
Fix a258833: Don't invalidate station list on vehicle load/unload. (#12112)

a258833 fixed a bug but as a result causes the station list to be rebuilt every time (once per game tick) a vehicle loads/unloads.

Instead just mark the window for redraw.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/economy.cpp
Show inline comments
 
@@ -1942,7 +1942,7 @@ static void LoadUnloadVehicle(Vehicle *f
 
	if (dirty_station) {
 
		st->MarkTilesDirty(true);
 
		SetWindowDirty(WC_STATION_VIEW, st->index);
 
		InvalidateWindowData(WC_STATION_LIST, st->owner);
 
		SetWindowDirty(WC_STATION_LIST, st->owner);
 
	}
 
}
 

	
0 comments (0 inline, 0 general)