Skip to content

Commit

Permalink
Use zoom to mouse by default. Fixes #5054
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 authored and mach0 committed Feb 25, 2012
1 parent 3714fdb commit 730c332
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/app/qgisapp.cpp
Expand Up @@ -1633,7 +1633,7 @@ void QgisApp::createOverview()
mMapCanvas->enableAntiAliasing( mySettings.value( "/qgis/enable_anti_aliasing", true ).toBool() );
mMapCanvas->useImageToRender( mySettings.value( "/qgis/use_qimage_to_render", false ).toBool() );

int action = mySettings.value( "/qgis/wheel_action", 0 ).toInt();
int action = mySettings.value( "/qgis/wheel_action", 2 ).toInt();
double zoomFactor = mySettings.value( "/qgis/zoom_factor", 2 ).toDouble();
mMapCanvas->setWheelAction(( QgsMapCanvas::WheelAction ) action, zoomFactor );
}
Expand Down Expand Up @@ -4771,7 +4771,7 @@ void QgisApp::options()
mMapCanvas->enableAntiAliasing( mySettings.value( "/qgis/enable_anti_aliasing" ).toBool() );
mMapCanvas->useImageToRender( mySettings.value( "/qgis/use_qimage_to_render" ).toBool() );

int action = mySettings.value( "/qgis/wheel_action", 0 ).toInt();
int action = mySettings.value( "/qgis/wheel_action", 2 ).toInt();
double zoomFactor = mySettings.value( "/qgis/zoom_factor", 2 ).toDouble();
mMapCanvas->setWheelAction(( QgsMapCanvas::WheelAction ) action, zoomFactor );

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsoptions.cpp
Expand Up @@ -318,7 +318,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
chbAskToSaveProjectChanges->setChecked( settings.value( "qgis/askToSaveProjectChanges", QVariant( true ) ).toBool() );
chbWarnOldProjectVersion->setChecked( settings.value( "/qgis/warnOldProjectVersion", QVariant( true ) ).toBool() );

cmbWheelAction->setCurrentIndex( settings.value( "/qgis/wheel_action", 0 ).toInt() );
cmbWheelAction->setCurrentIndex( settings.value( "/qgis/wheel_action", 2 ).toInt() );
spinZoomFactor->setValue( settings.value( "/qgis/zoom_factor", 2 ).toDouble() );

//
Expand Down
2 changes: 1 addition & 1 deletion src/core/composer/qgscomposermap.cpp
Expand Up @@ -424,7 +424,7 @@ void QgsComposerMap::zoomContent( int delta, double x, double y )

//read zoom mode
//0: zoom, 1: zoom and recenter, 2: zoom to cursor, 3: nothing
int zoomMode = settings.value( "/qgis/wheel_action", 0 ).toInt();
int zoomMode = settings.value( "/qgis/wheel_action", 2 ).toInt();
if ( zoomMode == 3 ) //do nothing
{
return;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/georeferencer/qgsgeorefplugingui.cpp
Expand Up @@ -920,7 +920,7 @@ void QgsGeorefPluginGui::createMapCanvas()
this, SLOT( releasePoint( const QPoint & ) ) );

QSettings s;
int action = s.value( "/qgis/wheel_action", 0 ).toInt();
int action = s.value( "/qgis/wheel_action", 2 ).toInt();
double zoomFactor = s.value( "/qgis/zoom_factor", 2 ).toDouble();
mCanvas->setWheelAction(( QgsMapCanvas::WheelAction ) action, zoomFactor );

Expand Down

0 comments on commit 730c332

Please sign in to comment.