Skip to content

Commit

Permalink
Re-introduce a timer to avoid finger hover / stylus interference
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Nov 12, 2023
1 parent a011ed3 commit f260c3d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/qml/qgismobileapp.qml
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ ApplicationWindow {
}

onHoveredChanged: {
if (skipHover) {
skipHover = hovered
if ( skipHover ) {
dummyHoverTimer.restart()
return
}

Expand All @@ -359,7 +359,17 @@ ApplicationWindow {
/* The second hover handler is a workaround what appears to be an issue with
* Qt whereas synthesized mouse event would trigger the first HoverHandler even though
* PointerDevice.TouchScreen was explicitly taken out of the accepted devices.
* The timer is needed as adding additional fingers onto a device re-triggers hovered
* changes in unpredictable order.
*/
Timer {
id: dummyHoverTimer
interval: 100
repeat: false

onTriggered: hoverHandler.skipHover = hoverHandler.hovered
}

HoverHandler {
id: dummyHoverHandler
enabled: !qfieldSettings.mouseAsTouchScreen
Expand Down

0 comments on commit f260c3d

Please sign in to comment.