mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-12 20:51:17 +00:00
Allow selection of polygons through the segment that closes the path too
This commit is contained in:
parent
3c65f81fb9
commit
5888f65a2e
|
@ -1560,7 +1560,12 @@ AnnotationPrivate* LineAnnotationPrivate::getNewAnnotationPrivate()
|
|||
|
||||
double LineAnnotationPrivate::distanceSqr( double x, double y, double xScale, double yScale )
|
||||
{
|
||||
return strokeDistance( ::distanceSqr( x, y, xScale, yScale, m_transformedLinePoints ),
|
||||
QLinkedList<NormalizedPoint> transformedLinePoints = m_transformedLinePoints;
|
||||
|
||||
if ( m_lineClosed ) // Close the path
|
||||
transformedLinePoints.append( transformedLinePoints.first() );
|
||||
|
||||
return strokeDistance( ::distanceSqr( x, y, xScale, yScale, transformedLinePoints ),
|
||||
m_style.width() * xScale / ( m_page->m_width * 2 ) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue