Skip to content

Commit

Permalink
Check if gestures are enabled before accepting zoom gestures
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchcurtis committed Aug 22, 2018
1 parent b010ac6 commit 377cfec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/imagecanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,7 @@ bool ImageCanvas::areToolsForbidden() const
bool ImageCanvas::event(QEvent *event)
{
// This allows us to handle the two-finger pinch zoom gesture on macOS trackpads, for example.
if (event->type() == QEvent::NativeGesture) {
if (mGesturesEnabled && event->type() == QEvent::NativeGesture) {
QNativeGestureEvent *gestureEvent = static_cast<QNativeGestureEvent*>(event);
if (gestureEvent->gestureType() == Qt::ZoomNativeGesture
|| gestureEvent->gestureType() == Qt::BeginNativeGesture
Expand Down

0 comments on commit 377cfec

Please sign in to comment.