From c619fa9f1f5eaaa60eea0f08770a04e703e51115 Mon Sep 17 00:00:00 2001 From: ruevs Date: Mon, 7 Oct 2024 09:49:11 +0300 Subject: [PATCH] GTK: Fix wrong direction of zoom when "smooth scrolling" with mouse wheel ... on Linux/GTK The bug was introduced here 31d0c27ecdc4ace0a1793191629d258cbd861826 https://github.com/solvespace/solvespace/pull/1464 https://github.com/solvespace/solvespace/pull/1470 Fixes #1488 --- src/platform/guigtk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/guigtk.cpp b/src/platform/guigtk.cpp index 89a29d94a..8e2d38b7b 100644 --- a/src/platform/guigtk.cpp +++ b/src/platform/guigtk.cpp @@ -578,7 +578,7 @@ class GtkGLWidget : public Gtk::GLArea { // gdk_scroll_event_get_direction((GdkEvent*)gdk_event, &dir); if(gdk_event_get_scroll_deltas((GdkEvent*)gdk_event, &dx, &dy)) { - delta = dy; + delta = -dy; } else if(gdk_event_get_scroll_direction((GdkEvent*)gdk_event, &dir)) { if(dir == GDK_SCROLL_UP) { delta = 1;