[FEATURE] Allow panning compositions by dragging with middle mouse button

This commit is contained in:
nyalldawson 2013-10-10 21:08:34 +11:00
parent 8a61767c30
commit eb0c794eb2

View File

@ -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 )
{