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
 
@@ -1939,13 +1939,13 @@ static void LoadUnloadVehicle(Vehicle *f
 
		SetWindowDirty(WC_VEHICLE_DETAILS, front->index);
 
		front->MarkDirty();
 
	}
 
	if (dirty_station) {
 
		st->MarkTilesDirty(true);
 
		SetWindowDirty(WC_STATION_VIEW, st->index);
 
		InvalidateWindowData(WC_STATION_LIST, st->owner);
 
		SetWindowDirty(WC_STATION_LIST, st->owner);
 
	}
 
}
 

	
 
/**
 
 * Load/unload the vehicles in this station according to the order
 
 * they entered.
0 comments (0 inline, 0 general)