Skip to content

Commit

Permalink
Only grab tap-and-hold gestures on Android
Browse files Browse the repository at this point in the history
We don't want to capture these on desktop environments - it
messes with dropdown menus and other click and drag type operations
  • Loading branch information
nyalldawson committed Aug 2, 2017
1 parent c373c8b commit 1887cff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12616,11 +12616,16 @@ void QgisApp::onLayerError( const QString &msg )

bool QgisApp::gestureEvent( QGestureEvent *event )
{
#ifdef Q_OS_ANDROID
if ( QGesture *tapAndHold = event->gesture( Qt::TapAndHoldGesture ) )
{
tapAndHoldTriggered( static_cast<QTapAndHoldGesture *>( tapAndHold ) );
}
return true;
#else
Q_UNUSED( event );
return false;
#endif
}

void QgisApp::tapAndHoldTriggered( QTapAndHoldGesture *gesture )
Expand Down

0 comments on commit 1887cff

Please sign in to comment.