Commit a675670d authored by Albert Astals Cid's avatar Albert Astals Cid

Save file attachments on left click

Instead of having to right click on it and choosing save from the menu
BUGS: 354268
parent 56b9b89a
......@@ -2404,6 +2404,11 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
{
d->document->processAction( static_cast<Okular::ScreenAnnotation*>( ann )->action() );
}
else if ( ann->subType() == Okular::Annotation::AFileAttachment )
{
const Okular::FileAttachmentAnnotation * fileAttachAnnot = static_cast< Okular::FileAttachmentAnnotation * >( ann );
GuiUtils::saveEmbeddedFile( fileAttachAnnot->embeddedFile(), this );
}
}
#if 0
// a link can move us to another page or even to another document, there's no point in trying to
......@@ -3883,6 +3888,11 @@ void PageView::updateCursor( const QPoint &p )
setCursor( Qt::PointingHandCursor );
}
}
else if ( annotation->subType() == Okular::Annotation::AFileAttachment )
{
d->mouseOnRect = true;
setCursor( Qt::PointingHandCursor );
}
else
{
setCursor( Qt::OpenHandCursor );
......
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