Commit 15ac564b authored by David Hurka's avatar David Hurka 🐬
Browse files

Annotations: explicitly accept tablet event when it is handled

This fixes the jagged freehand lines problem.
It was caused because tablet events were not accepted, and so were delivered again as mouse event, creating an additional line point slightly offset, causing sharp line angles.

BUG: 410723
FIXED-IN: 1.11
parent 34708565
...@@ -1966,6 +1966,9 @@ void PageView::tabletEvent(QTabletEvent *e) ...@@ -1966,6 +1966,9 @@ void PageView::tabletEvent(QTabletEvent *e)
// If we're editing an annotation and the tablet pen is either down or just released // If we're editing an annotation and the tablet pen is either down or just released
// then dispatch event to annotator // then dispatch event to annotator
if (d->annotator && d->annotator->active() && (d->penDown || penReleased)) { if (d->annotator && d->annotator->active() && (d->penDown || penReleased)) {
// accept the event, otherwise it comes back as a mouse event
e->accept();
const QPoint eventPos = contentAreaPoint(e->pos()); const QPoint eventPos = contentAreaPoint(e->pos());
PageViewItem *pageItem = pickItemOnPoint(eventPos.x(), eventPos.y()); PageViewItem *pageItem = pickItemOnPoint(eventPos.x(), eventPos.y());
const QPoint localOriginInGlobal = mapToGlobal(QPoint(0, 0)); const QPoint localOriginInGlobal = mapToGlobal(QPoint(0, 0));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment