Fix #19832: Scenery Search

This commit is contained in:
Josh Trzebiatowski 2023-06-14 06:04:21 -05:00 committed by GitHub
parent afcd70a8fd
commit 08e352405b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 10 deletions

View file

@ -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.

View file

@ -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);
}
}
}