Skip to content

Commit

Permalink
[FEATURE] Allow panning compositions by dragging with middle mouse bu…
Browse files Browse the repository at this point in the history
…tton
  • Loading branch information
nyalldawson committed Oct 10, 2013
1 parent 8a61767 commit eb0c794
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/gui/qgscomposerview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down

0 comments on commit eb0c794

Please sign in to comment.