mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix #8484: Object selection doesn't work
Revert change to _filter_object_counts from d145ae6922
This commit is contained in:
@@ -63,6 +63,7 @@ enum
|
||||
static constexpr uint8_t _numSourceGameItems = 8;
|
||||
|
||||
static uint32_t _filter_flags;
|
||||
static uint16_t _filter_object_counts[OBJECT_TYPE_COUNT];
|
||||
|
||||
static char _filter_string[MAX_PATH];
|
||||
|
||||
@@ -107,8 +108,6 @@ static constexpr const ObjectPageDesc ObjectSelectionPages[] = {
|
||||
// { STR_OBJECT_SELECTION_MUSIC, SPR_TAB_MUSIC_0, false },
|
||||
};
|
||||
|
||||
static uint16_t _filter_object_counts[std::size(ObjectSelectionPages)];
|
||||
|
||||
#pragma region Widgets
|
||||
|
||||
enum WINDOW_STAFF_LIST_WIDGET_IDX {
|
||||
@@ -1473,10 +1472,7 @@ static void filter_update_counts()
|
||||
if (!_FILTER_ALL || strlen(_filter_string) > 0)
|
||||
{
|
||||
const auto& selectionFlags = _objectSelectionFlags;
|
||||
for (size_t i = 0; i < std::size(ObjectSelectionPages); i++)
|
||||
{
|
||||
_filter_object_counts[i] = 0;
|
||||
}
|
||||
std::fill(std::begin(_filter_object_counts), std::end(_filter_object_counts), 0);
|
||||
|
||||
size_t numObjects = object_repository_get_items_count();
|
||||
const ObjectRepositoryItem* items = object_repository_get_items();
|
||||
|
||||
Reference in New Issue
Block a user