From eb0c794eb2cac361354641acaae82f7cf6ff8f4e Mon Sep 17 00:00:00 2001 From: nyalldawson Date: Thu, 10 Oct 2013 21:08:34 +1100 Subject: [PATCH] [FEATURE] Allow panning compositions by dragging with middle mouse button --- src/gui/qgscomposerview.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/gui/qgscomposerview.cpp b/src/gui/qgscomposerview.cpp index c41c4376223..39f1c677f2d 100644 --- a/src/gui/qgscomposerview.cpp +++ b/src/gui/qgscomposerview.cpp @@ -105,6 +105,19 @@ void QgsComposerView::mousePressEvent( QMouseEvent* e ) } return; } + else if ( e->button() == Qt::MidButton ) + { + //pan composer with middle button + mPanning = true; + mMouseLastXY = e->pos(); + if ( composition() ) + { + //lock cursor to closed hand cursor + composition()->setPreventCursorChange( true ); + } + viewport()->setCursor( Qt::ClosedHandCursor ); + return; + } switch ( mCurrentTool ) {