|
|
|
|
@ -460,19 +460,23 @@ class TextSelectorEngine : public AnnotatorEngine |
|
|
|
|
{ |
|
|
|
|
QPoint start( (int)( lastPoint.x * item()->width() ), (int)( lastPoint.y * item()->height() ) ); |
|
|
|
|
QPoint end( (int)( nX * item()->width() ), (int)( nY * item()->height() ) ); |
|
|
|
|
delete selection; |
|
|
|
|
selection = 0; |
|
|
|
|
Okular::RegularAreaRect * newselection = m_pageView->textSelectionForItem( item(), start, end ); |
|
|
|
|
QList<QRect> geom = newselection->geometry( (int)xScale, (int)yScale ); |
|
|
|
|
QRect newrect; |
|
|
|
|
foreach( const QRect& r, geom ) |
|
|
|
|
if ( !newselection->isEmpty() ) |
|
|
|
|
{ |
|
|
|
|
if ( newrect.isNull() ) |
|
|
|
|
newrect = r; |
|
|
|
|
else |
|
|
|
|
newrect |= r; |
|
|
|
|
QList<QRect> geom = newselection->geometry( (int)xScale, (int)yScale ); |
|
|
|
|
QRect newrect; |
|
|
|
|
Q_FOREACH ( const QRect& r, geom ) |
|
|
|
|
{ |
|
|
|
|
if ( newrect.isNull() ) |
|
|
|
|
newrect = r; |
|
|
|
|
else |
|
|
|
|
newrect |= r; |
|
|
|
|
} |
|
|
|
|
rect |= newrect; |
|
|
|
|
selection = newselection; |
|
|
|
|
} |
|
|
|
|
rect |= newrect; |
|
|
|
|
delete selection; |
|
|
|
|
selection = newselection; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else if ( type == Release && selection ) |
|
|
|
|
|