]> sigrok.org Git - pulseview.git/commitdiff
Ignore touch events generated by a TrackPad.
authorScott Shawcroft <redacted>
Sun, 12 Jan 2020 20:10:39 +0000 (12:10 -0800)
committerScott Shawcroft <redacted>
Sun, 12 Jan 2020 22:01:07 +0000 (14:01 -0800)
This improves two finger drag trackpad zooming and panning on a
Macbook Pro immensely because it used to redraw every touch event.
This change makes it rely on the mouse wheel events instead.

Pinch-to-zoom no longer works. Two finger drag up and down is an
alternative.

This fixes bug #1056.

pv/views/trace/viewport.cpp

index 85db5250a385766d9b1cf4611e1f055449e2dc30..0c73ec494adfbc72257252c59ead85d609a6ad24 100644 (file)
@@ -116,6 +116,9 @@ bool Viewport::touch_event(QTouchEvent *event)
                pinch_zoom_active_ = false;
                return false;
        }
+       if (event->device()->type() == QTouchDevice::TouchPad) {
+               return false;
+       }
 
        const QTouchEvent::TouchPoint &touchPoint0 = touchPoints.first();
        const QTouchEvent::TouchPoint &touchPoint1 = touchPoints.last();