From 2dcd40554ad1d146438fde656eed3e5ac14011da Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Fri, 22 Jul 2016 18:16:08 +1000 Subject: [PATCH] Use closed hand cursor when dragging canvas with middle mouse button --- src/gui/qgsmapcanvas.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/qgsmapcanvas.cpp b/src/gui/qgsmapcanvas.cpp index e489a6e20ca7..96ca44d30304 100644 --- a/src/gui/qgsmapcanvas.cpp +++ b/src/gui/qgsmapcanvas.cpp @@ -1439,6 +1439,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; } @@ -1477,6 +1478,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 ); }