When moving annotations, consider just the rotation of their pages, and not also the page orientation.

BUG: 177598

svn path=/trunk/KDE/kdegraphics/okular/; revision=898291
This commit is contained in:
Pino Toscano 2008-12-17 21:46:11 +00:00
parent 6ad1b92793
commit 551145c54f

View file

@ -1518,8 +1518,8 @@ void PageView::contentsMouseMoveEvent( QMouseEvent * e )
QPoint newpos = QPoint( e->x(), e->y() ) - itemRect.topLeft();
Okular::NormalizedRect r = d->mouseAnn->boundingRectangle();
QPoint p( newpos - d->mouseAnnPos );
QPointF pf( rotateInRect( p, pageItem->page()->totalOrientation() ) );
if ( pageItem->page()->totalOrientation() % 2 == 0 )
QPointF pf( rotateInRect( p, pageItem->page()->rotation() ) );
if ( pageItem->page()->rotation() % 2 == 0 )
{
pf.rx() /= pageItem->uncroppedWidth();
pf.ry() /= pageItem->uncroppedHeight();