Skip to content

Commit

Permalink
[FEATURE] Allow navigating back/forward through canvas view history
Browse files Browse the repository at this point in the history
with back/forward mouse buttons
  • Loading branch information
nyalldawson committed Mar 17, 2017
1 parent fa22fab commit 1a50352
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -1288,6 +1288,16 @@ void QgsMapCanvas::mouseReleaseEvent( QMouseEvent *e )
mCanvasProperties->panSelectorDown = false;
panActionEnd( mCanvasProperties->mouseLastXY );
}
else if ( e->button() == Qt::BackButton )
{
zoomToPreviousExtent();
return;
}
else if ( e->button() == Qt::ForwardButton )
{
zoomToNextExtent();
return;
}
else
{
if ( mZoomDragging && e->button() == Qt::LeftButton )
Expand Down

0 comments on commit 1a50352

Please sign in to comment.