Skip to content
Permalink
Browse files

Set cursor to pan cursor when space-dragging canvas

  • Loading branch information
nyalldawson committed May 29, 2016
1 parent 5377952 commit 79d640715e5a5bf0d4e5e1f0d9d43becc3990502
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/gui/qgsmapcanvas.cpp
@@ -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;
}
@@ -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 );
}

0 comments on commit 79d6407

Please sign in to comment.
You can’t perform that action at this time.