From e8b6e244982e464060072d738db98edc2970feda Mon Sep 17 00:00:00 2001 From: seanmajorpayne <4562746+seanmajorpayne@users.noreply.github.com> Date: Sat, 9 Oct 2021 19:49:26 +0900 Subject: [PATCH] Fix #15451: Guest List name filter remains after group selection --- distribution/changelog.txt | 1 + src/openrct2-ui/windows/GuestList.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 432cd2d76f..7bf4bb26a2 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -28,6 +28,7 @@ - Fix: [#15255] Tile Inspector shows banner information on walls that do not contain one. - Fix: [#15257] Chat icon shows in scenario/track editor. Other icons don't disable when deactivated in options menu. - Fix: [#15289] Unexpected behavior with duplicated banners which also caused desyncs in multiplayer. +- Fix: [#15451] Guest list name filter remains after group selection. - Fix: [#15476] Crash when placing/clearing small scenery. - Fix: [#15487] Map animations do not work correctly when loading an exported SV6 file in vanilla RCT2. - Fix: [#15496] Crash in paint_swinging_inverter_ship_structure(). diff --git a/src/openrct2-ui/windows/GuestList.cpp b/src/openrct2-ui/windows/GuestList.cpp index 9909718c7a..e70c7c4f83 100644 --- a/src/openrct2-ui/windows/GuestList.cpp +++ b/src/openrct2-ui/windows/GuestList.cpp @@ -321,8 +321,13 @@ public: _selectedPage = 0; _numPages = 1; widgets[WIDX_TRACKING].type = WindowWidgetType::Empty; - widgets[WIDX_FILTER_BY_NAME].type = WindowWidgetType::Empty; - if (_selectedTab == TabId::Individual) + if (_selectedTab == TabId::Summarised) + { + widgets[WIDX_FILTER_BY_NAME].type = WindowWidgetType::Empty; + SetWidgetPressed(WIDX_FILTER_BY_NAME, false); + _filterName.clear(); + } + else if (_selectedTab == TabId::Individual) { widgets[WIDX_TRACKING].type = WindowWidgetType::FlatBtn; widgets[WIDX_FILTER_BY_NAME].type = WindowWidgetType::FlatBtn; @@ -576,6 +581,7 @@ public: _selectedTab = TabId::Individual; widgets[WIDX_TRACKING].type = WindowWidgetType::FlatBtn; Invalidate(); + widgets[WIDX_FILTER_BY_NAME].type = WindowWidgetType::FlatBtn; scrolls[0].v_top = 0; RefreshList(); }