Commit 9c98ac0f authored by Albert Astals Cid's avatar Albert Astals Cid

Always release annotation on mouse release

BUGS: 345082
FIXED-IN: KDE Applications 15.04 Beta 3
parent 50116cf5
......@@ -2274,6 +2274,15 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
d->leftClickTimer.stop();
if ( d->mouseAnn )
{
// Just finished to move the annotation
d->mouseAnn->setFlags( d->mouseAnn->flags() & ~Okular::Annotation::BeingMoved );
d->document->translatePageAnnotation(d->mouseAnnPageNum, d->mouseAnn, Okular::NormalizedPoint( 0.0, 0.0 ) );
setCursor( Qt::ArrowCursor );
d->mouseAnn = 0;
}
// don't perform any mouse action when no document is shown..
if ( d->items.isEmpty() )
{
......@@ -2307,15 +2316,6 @@ void PageView::mouseReleaseEvent( QMouseEvent * e )
return;
}
if ( d->mouseAnn )
{
// Just finished to move the annotation
d->mouseAnn->setFlags( d->mouseAnn->flags() & ~Okular::Annotation::BeingMoved );
d->document->translatePageAnnotation(d->mouseAnnPageNum, d->mouseAnn, Okular::NormalizedPoint( 0.0, 0.0 ) );
setCursor( Qt::ArrowCursor );
d->mouseAnn = 0;
}
bool leftButton = e->button() == Qt::LeftButton;
bool rightButton = e->button() == Qt::RightButton;
switch ( d->mouseMode )
......
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