[Kstars-devel] Patch for RMB problems on OSX
Sean Houghton
sean.houghton at gmail.com
Sat Sep 5 07:27:50 UTC 2015
I've attached a patch that fixes a problem on OSX caused by the right-click
gesture on macbooks. The gesture is two fingers on the trackpad and a
click. The problem is that the two fingers triggered a mousewheel event
with zero delta. The code was interpreting this as a zoom out. This made it
impossible to slew the scope to a particular location w/out a mouse. The
fix is to only consider negative deltas as zoom a out.
--
-Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20150905/94a9e24f/attachment.html>
-------------- next part --------------
From ef0a904058c00a43e16b74fb90a4469fbcd3116c Mon Sep 17 00:00:00 2001
From: Sean Houghton <sean.houghton at gmail.com>
Date: Sat, 5 Sep 2015 00:21:14 -0700
Subject: [PATCH] Fix zoom out on two-finger gesture on OS X. Ignore zero-delta
mouse wheel events.
---
kstars/skymapevents.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kstars/skymapevents.cpp b/kstars/skymapevents.cpp
index 00a24a4..7b7c2e1 100644
--- a/kstars/skymapevents.cpp
+++ b/kstars/skymapevents.cpp
@@ -500,7 +500,7 @@ void SkyMap::mouseMoveEvent( QMouseEvent *e ) {
void SkyMap::wheelEvent( QWheelEvent *e ) {
if ( e->delta() > 0 )
zoomInOrMagStep ( e->modifiers() );
- else
+ else if ( e->delta() < 0 )
zoomOutOrMagStep( e->modifiers() );
}
--
2.2.1
More information about the Kstars-devel
mailing list