Skip to content

Commit eb0c794

Browse files
committedOct 10, 2013
[FEATURE] Allow panning compositions by dragging with middle mouse button
1 parent 8a61767 commit eb0c794

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
 

‎src/gui/qgscomposerview.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,19 @@ void QgsComposerView::mousePressEvent( QMouseEvent* e )
105105
}
106106
return;
107107
}
108+
else if ( e->button() == Qt::MidButton )
109+
{
110+
//pan composer with middle button
111+
mPanning = true;
112+
mMouseLastXY = e->pos();
113+
if ( composition() )
114+
{
115+
//lock cursor to closed hand cursor
116+
composition()->setPreventCursorChange( true );
117+
}
118+
viewport()->setCursor( Qt::ClosedHandCursor );
119+
return;
120+
}
108121

109122
switch ( mCurrentTool )
110123
{

0 commit comments

Comments
 (0)
Please sign in to comment.