From 0d77c279aa6b0878d264dde24bd213bc744070d3 Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Mon, 21 May 2018 19:51:12 +0200 Subject: [PATCH] Fix: buttons sometimes stay pressed In the invalidate function of the tile inspector, the checkboxes get checked to match the selected tile element. Some of those checkboxes share their widget index with buttons from other pages. When a checkbox is checked, the it's set to be "pressed", which causes the butons in the other tabs so appear that way. This behaviour is fixed by unpressing widgets when switching to another page. --- src/openrct2-ui/windows/TileInspector.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index d331d48555..5947291c5c 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -1352,6 +1352,7 @@ static void window_tile_inspector_set_page(rct_window *w, const TILE_INSPECTOR_P w->widgets = PageWidgets[page]; w->enabled_widgets = PageEnabledWidgets[page]; w->disabled_widgets = PageDisabledWidgets[page]; + w->pressed_widgets = 0; } static void window_tile_inspector_scrollmousedown(rct_window *w, sint32 scrollIndex, sint32 x, sint32 y)