Commit 7cdc42a6 authored by Fabio D'Urso's avatar Fabio D'Urso

Hide widget annotations from the user (some other checks)

This patch also prevents the popup window from being opened on
double-click and the annotation tooltip from being shown.
parent 38861f5f
......@@ -2916,7 +2916,7 @@ void PageView::mouseDoubleClickEvent( QMouseEvent * e )
const Okular::ObjectRect * orect = pageItem->page()->objectRect( Okular::ObjectRect::OAnnotation, nX, nY, itemRect.width(), itemRect.height() );
if ( orect )
ann = ( (Okular::AnnotationObjectRect *)orect )->annotation();
if ( ann )
if ( ann && ann->subType() != Okular::Annotation::AWidget )
{
openAnnotationWindow( ann, pageItem->pageNumber() );
}
......@@ -3026,7 +3026,7 @@ bool PageView::viewportEvent( QEvent * e )
}
}
if ( ann )
if ( ann && ann->subType() != Okular::Annotation::AWidget )
{
QRect r = rect->boundingRect( pageItem->uncroppedWidth(), pageItem->uncroppedHeight() );
r.translate( pageItem->uncroppedGeometry().topLeft() );
......
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