Commit 0666e18f authored by Albert Astals Cid's avatar Albert Astals Cid

Merge remote-tracking branch 'origin/KDE/4.14'

parents ee8b4425 d888b204
......@@ -2350,6 +2350,8 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
static const double s_minDistance = 0.025; // FIXME?: empirical value?
double distance = 0.0;
rect = pageItem->page()->nearestObjectRect( Okular::ObjectRect::SourceRef, nX, nY, pageItem->uncroppedWidth(), pageItem->uncroppedHeight(), &distance );
// distance is distanceSqr, adapt it to a normalized value
distance = distance / (pow( pageItem->uncroppedWidth(), 2 ) + pow( pageItem->uncroppedHeight(), 2 ));
if ( rect && ( distance > s_minDistance ) )
rect = 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