Commit 13fd564f authored by Fabio D'Urso's avatar Fabio D'Urso

Bound events routed to annotator engine within the locked page

In other words, this patch makes it impossible to draw annotations
outside the page boundaries.
parent 55c41333
......@@ -746,8 +746,8 @@ QRect PageViewAnnotator::performRouteMouseOrTabletEvent(const AnnotatorEngine::E
// find out normalized mouse coords inside current item
const QRect & itemRect = m_lockedItem->uncroppedGeometry();
const QPointF eventPos = m_pageView->contentAreaPoint( pos );
double nX = m_lockedItem->absToPageX( eventPos.x() );
double nY = m_lockedItem->absToPageY( eventPos.y() );
const double nX = qBound( 0.0, m_lockedItem->absToPageX( eventPos.x() ), 1.0 );
const double nY = qBound( 0.0, m_lockedItem->absToPageY( eventPos.y() ), 1.0 );
QRect modifiedRect;
......
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