From 72446f7b3ae92d3b9975e2a1a459176d933d8b6f Mon Sep 17 00:00:00 2001 From: rinode Date: Tue, 28 Apr 2026 22:00:03 +0200 Subject: [PATCH 1/2] Fix #26460: Delete, build, forward and backward buttons in Ride Construction window are always held --- src/openrct2-ui/windows/RideConstruction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index 082d9ef6ba..a0cf5f1414 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -2079,7 +2079,7 @@ namespace OpenRCT2::Ui::Windows WIDX_BANKING_GROUPBOX, WIDX_CONSTRUCT, WIDX_DEMOLISH, WIDX_PREVIOUS_SECTION, WIDX_NEXT_SECTION, WIDX_ENTRANCE_EXIT_GROUPBOX, WIDX_ENTRANCE, WIDX_EXIT }) { - if (isWidgetPressed(preservedIndex)) + if (widgets[preservedIndex].flags.has(WidgetFlag::isPressed)) newPressedWidgets |= (1uLL << preservedIndex); } From 8de672bc82128e4ddf9f25fa6b124a754fd616e9 Mon Sep 17 00:00:00 2001 From: rinode Date: Tue, 28 Apr 2026 22:00:37 +0200 Subject: [PATCH 2/2] Fix #26462: Opening Tile Inspector crashes the game --- src/openrct2-ui/windows/TileInspector.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index 2ea53b250d..5bbfd27bfa 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -474,16 +474,21 @@ namespace OpenRCT2::Ui::Windows ViewportInteractionItem::footpath, ViewportInteractionItem::pathAddition, ViewportInteractionItem::parkEntrance, ViewportInteractionItem::wall, ViewportInteractionItem::largeScenery, ViewportInteractionItem::banner); + static constexpr WidgetIndex kDisabledWidgetsDefault[] = { + WIDX_BUTTON_MOVE_UP, WIDX_BUTTON_MOVE_DOWN, WIDX_BUTTON_REMOVE, WIDX_BUTTON_ROTATE, WIDX_BUTTON_COPY, + }; + static constexpr WidgetIndex kDisabledWidgetsLargeScenery[] = { WIDX_BUTTON_ROTATE }; + // clang-format off - static constexpr std::initializer_list kDisabledWidgetsByPage[] = { - { WIDX_BUTTON_MOVE_UP, WIDX_BUTTON_MOVE_DOWN, WIDX_BUTTON_REMOVE, WIDX_BUTTON_ROTATE, WIDX_BUTTON_COPY }, + static constexpr std::span kDisabledWidgetsByPage[] = { + kDisabledWidgetsDefault, {}, {}, {}, {}, {}, {}, - { WIDX_BUTTON_ROTATE }, + kDisabledWidgetsLargeScenery, {}, }; // clang-format on