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