mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[FEATURE] Allow panning compositions by dragging with middle mouse button
This commit is contained in:
parent
8a61767c30
commit
eb0c794eb2
@ -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 )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user