Fix: Zoom-scroll extra viewports only if the mouse cursor is over the viewport. (#14209)

This commit is contained in:
Peter Nelson
2025-05-04 14:16:05 +01:00
committed by GitHub
parent afc1e76575
commit 3e608b5fe4
9 changed files with 23 additions and 13 deletions

View File

@@ -1131,8 +1131,9 @@ public:
}
}
void OnMouseWheel(int wheel) override
void OnMouseWheel(int wheel, WidgetID widget) override
{
if (widget != WID_IV_VIEWPORT) return;
if (_settings_client.gui.scrollwheel_scrolling != SWS_OFF) {
DoZoomInOutWindow(wheel < 0 ? ZOOM_IN : ZOOM_OUT, this);
}