1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 06:23:04 +01:00

Fix #11002: Rides list shows both red and green light activated (#11622)

This commit is contained in:
Michael Steenbeek
2020-05-05 00:38:48 +02:00
committed by GitHub
parent ff46481453
commit 80933dc0cc
2 changed files with 3 additions and 2 deletions

View File

@@ -530,9 +530,9 @@ static void window_ride_list_invalidate(rct_window* w)
w->widgets[WIDX_OPEN_LIGHT].type = WWT_IMGBTN;
const auto& rideManager = GetRideManager();
auto allClosed = false;
auto allClosed = true;
auto allOpen = false;
if (std::size(rideManager) != 0)
if (w->no_list_items > 0 && std::size(rideManager) != 0)
{
auto c = static_cast<RideClassification>(w->page);
allClosed = std::none_of(rideManager.begin(), rideManager.end(), [c](const Ride& ride) {