Skip to content

Commit

Permalink
Don't zoom with mouse wheel if keyboard modifiers pressed
Browse files Browse the repository at this point in the history
  • Loading branch information
Borys Jurgiel committed Mar 30, 2013
1 parent 50c3303 commit 8299001
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gui/qgsmapcanvas.cpp
Expand Up @@ -37,6 +37,7 @@ email : sherman at mrcc.com
#include <QWheelEvent>

#include "qgis.h"
#include "qgsapplication.h"
#include "qgslogger.h"
#include "qgsmapcanvas.h"
#include "qgsmapcanvasmap.h"
Expand Down Expand Up @@ -1093,6 +1094,12 @@ void QgsMapCanvas::wheelEvent( QWheelEvent *e )
return;
}

if ( QgsApplication::keyboardModifiers() )
{
// leave the wheel for map tools if any modifier pressed
return;
}

switch ( mWheelAction )
{
case WheelZoom:
Expand Down

0 comments on commit 8299001

Please sign in to comment.