Navigation Menu

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 committed Feb 21, 2012
1 parent 3bfbb59 commit 9ae7c94
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 @@ -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 );
}
Expand Down Expand Up @@ -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 );

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsoptions.cpp
Expand Up @@ -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() );

//
Expand Down
2 changes: 1 addition & 1 deletion src/core/composer/qgscomposermap.cpp
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/georeferencer/qgsgeorefplugingui.cpp
Expand Up @@ -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 );

Expand Down

1 comment on commit 9ae7c94

@andreasneumann
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Please sign in to comment.