Skip to content
Permalink
Browse files
Use zoom to mouse by default. Fixes #5054
  • Loading branch information
NathanW2 committed Feb 21, 2012
1 parent 3bfbb59 commit 9ae7c942c2164a8309b34bf632e37a029dae0b06
@@ -1719,7 +1719,7 @@ void QgisApp::createOverview()
mMapCanvas->enableAntiAliasing( mySettings.value( "/qgis/enable_anti_aliasing", true ).toBool() );
mMapCanvas->useImageToRender( mySettings.value( "/qgis/use_qimage_to_render", true ).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 );
}
@@ -4877,7 +4877,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 );

@@ -339,7 +339,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() );

//
@@ -431,7 +431,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;
@@ -921,7 +921,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 );

1 comment on commit 9ae7c94

@andreasneumann

This comment has been minimized.

Copy link
Member

@andreasneumann andreasneumann commented on 9ae7c94 Feb 21, 2012

this makes sense - after a fresh install I always set the zoom to mouse cursor first! Thanks.

Please sign in to comment.