forked from OpenBoard-org/OpenBoard
-
Notifications
You must be signed in to change notification settings - Fork 0
[Bug] delegate handles do not work with tablet pen #221
Copy link
Copy link
Closed
Labels
Description
Reported here: OpenBoard-org#1270 (comment)
The function isUnderMouse() is not suitable to detect a tool when using a tablet pen. The first proposal from @fadikdawoud is to revert the changes I have introduced with ba0eedd.
Further analysis:
- It might be that
isUnderMouse()does not work as expected when using a tablet pen, probably becauseQCurssor::pos()is not updated when this function is called. - Reverting the changes is not an option, as this introduces the original problem: The cursor shape does not correspond to the action taken when pressing the mouse button.
- Only using the reverse sequence but otherwise the old code is also not an option. The functions like
rotateButtonBounds()do not exactly correspond to the button outline and therefore the misalignment between cursor shape and action remains.
My proposed solution is now to use mRotateButton->contains(mRotateButton->mapFromScene(pos)) etc. and to invoke toolFromPos() with the scene position. This code guarantees alignment between cursor shape and action and uses the position provided by the event.
Reactions are currently unavailable