Skip to content
Permalink
Browse files

Use closed hand cursor when dragging canvas with middle mouse button

(cherry-picked from 2dcd405)
  • Loading branch information
nyalldawson committed Jul 26, 2016
1 parent 89a4b84 commit a2f3f708e3788191026a51739949d6b0ee5142f6
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/gui/qgsmapcanvas.cpp
@@ -1405,6 +1405,7 @@ void QgsMapCanvas::mousePressEvent( QMouseEvent* e )
//use middle mouse button for panning, map tools won't receive any events in that case
if ( e->button() == Qt::MidButton )
{
QApplication::setOverrideCursor( Qt::ClosedHandCursor );
mCanvasProperties->panSelectorDown = true;
mCanvasProperties->rubberStartPoint = mCanvasProperties->mouseLastXY;
}
@@ -1443,6 +1444,7 @@ void QgsMapCanvas::mouseReleaseEvent( QMouseEvent* e )
//use middle mouse button for panning, map tools won't receive any events in that case
if ( e->button() == Qt::MidButton )
{
QApplication::restoreOverrideCursor();
mCanvasProperties->panSelectorDown = false;
panActionEnd( mCanvasProperties->mouseLastXY );
}

0 comments on commit a2f3f70

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