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
remotes/origin/work/aacid/annoying_braces
René van Paassen 6 years ago committed by David Hurka
parent 861b5a58a0
commit ab7ae92a89
  1. 3
      ui/pageview.cpp

@ -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
// then dispatch event to annotator
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());
PageViewItem *pageItem = pickItemOnPoint(eventPos.x(), eventPos.y());
const QPoint localOriginInGlobal = mapToGlobal(QPoint(0, 0));

Loading…
Cancel
Save