From 7270a86eb7055792b94c10ddd266bbe3c3c7bc91 Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Sat, 24 Aug 2019 10:45:39 +0200 Subject: [PATCH] Fix #9924: Traffic light in Ride List shows incorrect status (#9931) --- src/openrct2-ui/windows/RideList.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2-ui/windows/RideList.cpp b/src/openrct2-ui/windows/RideList.cpp index 95203a7a3e..08e341fe75 100644 --- a/src/openrct2-ui/windows/RideList.cpp +++ b/src/openrct2-ui/windows/RideList.cpp @@ -533,10 +533,10 @@ static void window_ride_list_invalidate(rct_window* w) if (std::size(rideManager) != 0) { auto c = (RideClassification)w->page; - allClosed = std::all_of(rideManager.begin(), rideManager.end(), [c](const Ride& ride) { + allClosed = std::none_of(rideManager.begin(), rideManager.end(), [c](const Ride& ride) { return ride.GetClassification() == c && ride.status == RIDE_STATUS_OPEN; }); - allOpen = std::all_of(rideManager.begin(), rideManager.end(), [c](const Ride& ride) { + allOpen = std::none_of(rideManager.begin(), rideManager.end(), [c](const Ride& ride) { return ride.GetClassification() == c && ride.status != RIDE_STATUS_OPEN; }); }