Skip to content

Commit

Permalink
Set cursor to pan cursor when space-dragging canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 29, 2016
1 parent 5377952 commit 79d6407
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/qgsmapcanvas.cpp
Expand Up @@ -1255,6 +1255,7 @@ void QgsMapCanvas::keyPressEvent( QKeyEvent * e )
//mCanvasProperties->dragging = true;
if ( ! e->isAutoRepeat() )
{
QApplication::setOverrideCursor( Qt::ClosedHandCursor );
mCanvasProperties->panSelectorDown = true;
mCanvasProperties->rubberStartPoint = mCanvasProperties->mouseLastXY;
}
Expand Down Expand Up @@ -1308,7 +1309,7 @@ void QgsMapCanvas::keyReleaseEvent( QKeyEvent * e )
if ( !e->isAutoRepeat() && mCanvasProperties->panSelectorDown )
{
QgsDebugMsg( "Releasing pan selector" );

QApplication::restoreOverrideCursor();
mCanvasProperties->panSelectorDown = false;
panActionEnd( mCanvasProperties->mouseLastXY );
}
Expand Down

0 comments on commit 79d6407

Please sign in to comment.