Skip to content
Commit e6002e79 authored by Nikola Nikolic's avatar Nikola Nikolic Committed by Oliver Sander
Browse files

Fix: Involuntary scrolling when annotations encounter the edge of the page

There are three reasons why scrolling happens (first two cases of scrolling are actually due to
viewport transition that is triggered by annotation being traslated/created):

1. VisiblePageRect are NormalizedRect and should be represented by four values in [0, 1] interval.
   Due to rounding errors caused by using QRect, they only reach the [0, 0.999] interval.
   That means that right and bottom edge of the page are never visible so if annotation
   is translated along the right/bottom edge viewport transition occurs (fixed in
   PageView::slotRequestVisiblePixmaps)

2. For freehand line there are some constants (dX, dY) that make a line to be drawn outside
   the page borders causing viewport transition. Removing these constants solves the problem (fixed
   in SmoothPathEngine::event)

3. Browse mode is activated as soon as the cursor is moved outside the viewport.
   Instead, we should forward the move event to the annotation which than can ignore the event (fixed
   in PageView::mouseMoveEvent)

BUG: 436742
parent e4b1d3d7
Pipeline #268282 passed with stage
in 16 minutes and 18 seconds
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