1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Fix #16008: Can select elements when no tile selected

This commit is contained in:
Hielke Morsink
2021-11-26 15:47:43 +01:00
committed by GitHub
parent 90d2be3ddd
commit 8b9bcf4adc
2 changed files with 5 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
- Feature: [#714] Allow up to 255 trains per ride.
- Feature: [#2253] Path surfaces and railings can be mixed and matched, like in RCT1.
- Improved: [#10664] Invisibility status is now shown in the Tile Inspector.
- Fix: [#16008] Tile Inspector can select elements from last tile without reselecting it.
0.3.5.1 (2021-11-21)
------------------------------------------------------------------------

View File

@@ -1337,6 +1337,10 @@ static void WindowTileInspectorSetPage(rct_window* w, const TileInspectorPage pa
static void WindowTileInspectorScrollmousedown(rct_window* w, int32_t scrollIndex, const ScreenCoordsXY& screenCoords)
{
// There is nothing to interact with when no tile is selected
if (!windowTileInspectorTileSelected)
return;
// Because the list items are displayed in reverse order, subtract the calculated index from the amount of elements
const int16_t index = windowTileInspectorElementCount - (screenCoords.y - 1) / SCROLLABLE_ROW_HEIGHT - 1;
WindowTileInspectorSelectElementFromList(w, index);