From 08e352405b356ceaf4dd1d1ab7ecf5a67b723744 Mon Sep 17 00:00:00 2001 From: Josh Trzebiatowski Date: Wed, 14 Jun 2023 06:04:21 -0500 Subject: [PATCH] Fix #19832: Scenery Search --- distribution/changelog.txt | 1 + src/openrct2-ui/windows/Scenery.cpp | 18 ++++++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 3a51869eeb..6c1be32262 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -47,6 +47,7 @@ - Fix: [#19767] No message when path is not connected to ride exit and is therefore unreachable for mechanics. - Fix: [#19800] Crash when displaying station stats with more than 62 stations. - Fix: [#19801] The in-game load/save window cannot be resized anymore. +- Fix: [#19832] Some scenery group items missing from all scenery tab. - Fix: [#19854] Looping Coaster trains clipping through steep quarter turns down. - Fix: [#19858] Issue drawing simulate flag icon on alternate colour palettes. - Fix: [#19901] Random shop colours never assigning last colour. diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index 73837de353..92a4d47c1f 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -1122,8 +1122,12 @@ private: if (IsSceneryAvailableToBuild(selection)) { - // Get current tab - const auto tabIndex = FindTabWithScenery(selection); + // Add scenery to all tab + auto* allTabInfo = GetSceneryTabInfoForAll(); + if (allTabInfo != nullptr) + { + allTabInfo->AddEntryToBack(selection); + } // Add scenery to primary group (usually trees or path additions) if (sceneryGroupIndex != OBJECT_ENTRY_INDEX_NULL) @@ -1136,7 +1140,8 @@ private: } } - // If scenery is no tab, add it to misc + // If scenery has no tab, add it to misc + const auto tabIndex = FindTabWithScenery(selection); if (!tabIndex.has_value()) { auto* tabInfo = GetSceneryTabInfoForMisc(); @@ -1145,13 +1150,6 @@ private: tabInfo->AddEntryToBack(selection); } } - - // Add all scenery to all tab - auto tabInfo = GetSceneryTabInfoForAll(); - if (tabInfo != nullptr) - { - tabInfo->AddEntryToBack(selection); - } } }