1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00

Fix: Ghosts and tooltips move when panning the viewport by right-click dragging

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
This commit is contained in:
Hielke Morsink
2022-05-21 09:39:13 +02:00
parent 7832288ff9
commit 95df149804
3 changed files with 4 additions and 2 deletions

View File

@@ -21,6 +21,7 @@
- Fix: [#17104] Changing map size does not invalidate park size.
- Fix: [#17197] Segfault when extracting files from the GOG installer.
- Fix: [#17205] Map generator sometimes crashes when not all standard terrain objects are available.
- Fix: [#17221] Object ghosts and tooltips follow invisible cursor when moving the viewport by right-click dragging.
0.4.0 (2022-04-25)
------------------------------------------------------------------------

View File

@@ -1175,7 +1175,7 @@ void ProcessMouseTool(const ScreenCoordsXY& screenCoords)
if (w == nullptr)
tool_cancel();
else
else if (input_get_state() != InputState::ViewportRight)
window_event_tool_update_call(w, gCurrentToolWidget.widget_index, screenCoords);
}
}

View File

@@ -71,7 +71,8 @@ void WindowMapTooltipUpdateVisibility()
// Check for cursor movement
_cursorHoldDuration++;
if (abs(cursorChange.x) > 5 || abs(cursorChange.y) > 5 || (input_test_flag(INPUT_FLAG_5)))
if (abs(cursorChange.x) > 5 || abs(cursorChange.y) > 5 || (input_test_flag(INPUT_FLAG_5))
|| input_get_state() == InputState::ViewportRight)
_cursorHoldDuration = 0;
_lastCursor = cursor;