1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Fix #7569: Assertion hit when using the XY spinners (#7570)

The X/Y spinners change the currently tile selected, and reset the element selection index. Previously this would also set the page to default immediately, but since that's now done on invalidation instead, the page would not be correct. This is fixed by checking the index of the selected element too, instead of only the selected page, in the mouse_up event.
This commit is contained in:
Hielke Morsink
2018-05-27 18:03:34 +02:00
committed by GitHub
parent f5c8ad2189
commit 15ae358946

View File

@@ -991,7 +991,7 @@ static void window_tile_inspector_mouseup(rct_window *w, rct_widgetindex widgetI
}
// Only element-specific widgets from now on
if (w->page == TILE_INSPECTOR_PAGE_DEFAULT) {
if (w->selected_list_item == TILE_INSPECTOR_PAGE_DEFAULT || w->selected_list_item == -1) {
return;
}