Merge remote-tracking branch 'origin/Applications/18.04'

This commit is contained in:
Albert Astals Cid 2018-04-17 00:39:32 +02:00
commit 47836646d7

View file

@ -368,7 +368,6 @@ void PagePrivate::rotateAt( Rotation orientation )
if ( orientation == m_rotation )
return;
deleteHighlights();
deleteTextSelections();
if ( ( (int)m_orientation + (int)m_rotation ) % 2 != ( (int)m_orientation + (int)orientation ) % 2 )
@ -411,10 +410,11 @@ void PagePrivate::rotateAt( Rotation orientation )
for ( ; objectIt != end; ++objectIt )
(*objectIt)->transform( matrix );
const QTransform highlightRotationMatrix = Okular::buildRotationMatrix( (Rotation)(((int)m_rotation - (int)oldRotation + 4) % 4) );
QLinkedList< HighlightAreaRect* >::const_iterator hlIt = m_page->m_highlights.begin(), hlItEnd = m_page->m_highlights.end();
for ( ; hlIt != hlItEnd; ++hlIt )
{
(*hlIt)->transform( RotationJob::rotationMatrix( oldRotation, m_rotation ) );
(*hlIt)->transform( highlightRotationMatrix );
}
}