Changeset - r27986:e39e74d7aa1b
[Not reviewed]
master
0 1 0
Peter Nelson - 14 months ago 2023-10-06 20:09:24
peter1138@openttd.org
Fix 94167dfd: Don't shade the currently selected engine in autoreplace window. (#11354)

This breaks #7729 which specifically allows autoreplace of same engine types, and also did not work properly if the engine had been built during the current game session.
1 file changed with 1 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/autoreplace_gui.cpp
Show inline comments
 
@@ -175,9 +175,7 @@ class ReplaceVehicleWindow : public Wind
 
				if (!CheckAutoreplaceValidity(this->sel_engine[0], eid, _local_company)) continue;
 
			}
 

	
 
			EngineDisplayFlags flags = (side == 0) ? EngineDisplayFlags::None : e->display_flags;
 
			if (side == 1 && eid == this->sel_engine[0]) flags |= EngineDisplayFlags::Shaded;
 
			list.emplace_back(eid, e->info.variant_id, flags, 0);
 
			list.emplace_back(eid, e->info.variant_id, (side == 0) ? EngineDisplayFlags::None : e->display_flags, 0);
 

	
 
			if (side == 1) {
 
				EngineID parent = e->info.variant_id;
0 comments (0 inline, 0 general)