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.
This commit is contained in:
Peter Nelson 2023-10-06 21:09:24 +01:00 committed by GitHub
parent 89acfc7ff9
commit 2fd3d943aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -175,9 +175,7 @@ class ReplaceVehicleWindow : public Window {
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;