@@ -2136,13 +2136,15 @@ void QgisApp::createStatusBar()
2136
2136
2137
2137
mScaleWidget = new QgsStatusBarScaleWidget( mMapCanvas, statusBar() );
2138
2138
mScaleWidget->setFont( myFont );
2139
+ connect( mScaleWidget, SIGNAL( scaleLockChanged( bool ) ), mMapCanvas, SLOT( setScaleLocked( bool ) ) );
2139
2140
statusBar()->addPermanentWidget( mScaleWidget, 0 );
2140
2141
2141
2142
// zoom widget
2142
- QSettings mySettings;
2143
- mMagnifierWidget = new QgsStatusBarMagnifierWidget( mMapCanvas, statusBar() );
2143
+ mMagnifierWidget = new QgsStatusBarMagnifierWidget( statusBar() );
2144
2144
mMagnifierWidget->setFont( myFont );
2145
- mMagnifierWidget->setMagnificationLevel( mySettings.value( "/qgis/magnifier_level", 100 ).toInt() );
2145
+ connect( mMapCanvas, SIGNAL( magnificationChanged( double ) ), mMagnifierWidget, SLOT( updateMagnification( double ) ) );
2146
+ connect( mMagnifierWidget, SIGNAL( magnificationChanged( double ) ), mMapCanvas, SLOT( setMagnificationFactor( double ) ) );
2147
+ mMagnifierWidget->updateMagnification( QSettings().value( "/qgis/magnifier_factor_default", 1.0 ).toDouble() );
2146
2148
statusBar()->addPermanentWidget( mMagnifierWidget, 0 );
2147
2149
2148
2150
if ( QgsMapCanvas::rotationEnabled() )
@@ -2689,9 +2691,8 @@ void QgisApp::createOverview()
2689
2691
// Anti Aliasing enabled by default as of QGIS 1.7
2690
2692
mMapCanvas->enableAntiAliasing( mySettings.value( "/qgis/enable_anti_aliasing", true ).toBool() );
2691
2693
2692
- int action = mySettings.value( "/qgis/wheel_action", 2 ).toInt();
2693
2694
double zoomFactor = mySettings.value( "/qgis/zoom_factor", 2 ).toDouble();
2694
- mMapCanvas->setWheelAction( static_cast< QgsMapCanvas::WheelAction >( action ), zoomFactor );
2695
+ mMapCanvas->setWheelFactor( zoomFactor );
2695
2696
2696
2697
mMapCanvas->setCachingEnabled( mySettings.value( "/qgis/enable_render_caching", true ).toBool() );
2697
2698
@@ -8563,9 +8564,8 @@ void QgisApp::showOptionsDialog( QWidget *parent, const QString& currentPage )
8563
8564
8564
8565
mMapCanvas->enableAntiAliasing( mySettings.value( "/qgis/enable_anti_aliasing" ).toBool() );
8565
8566
8566
- int action = mySettings.value( "/qgis/wheel_action", 2 ).toInt();
8567
8567
double zoomFactor = mySettings.value( "/qgis/zoom_factor", 2 ).toDouble();
8568
- mMapCanvas->setWheelAction( static_cast< QgsMapCanvas::WheelAction >( action ), zoomFactor );
8568
+ mMapCanvas->setWheelFactor( zoomFactor );
8569
8569
8570
8570
mMapCanvas->setCachingEnabled( mySettings.value( "/qgis/enable_render_caching", true ).toBool() );
8571
8571
@@ -8580,8 +8580,6 @@ void QgisApp::showOptionsDialog( QWidget *parent, const QString& currentPage )
8580
8580
layer->setLayerName( layer->originalName() );
8581
8581
}
8582
8582
8583
- mMagnifierWidget->setMagnificationLevel( mySettings.value( "/qgis/magnifier_level" ).toInt() );
8584
-
8585
8583
//update any open compositions so they reflect new composer settings
8586
8584
//we have to push the changes to the compositions here, because compositions
8587
8585
//have no access to qgisapp and accordingly can't listen in to changes
@@ -8612,6 +8610,10 @@ void QgisApp::showOptionsDialog( QWidget *parent, const QString& currentPage )
8612
8610
8613
8611
mMapCanvas->setSegmentationTolerance( mySettings.value( "/qgis/segmentationTolerance", "0.01745" ).toDouble() );
8614
8612
mMapCanvas->setSegmentationToleranceType( QgsAbstractGeometryV2::SegmentationToleranceType( mySettings.value( "/qgis/segmentationToleranceType", "0" ).toInt() ) );
8613
+
8614
+ double factor = mySettings.value( "/qgis/magnifier_factor_default", 1.0 ).toDouble();
8615
+ mMagnifierWidget->setDefaultFactor( factor );
8616
+ mMagnifierWidget->updateMagnification( factor );
8615
8617
}
8616
8618
8617
8619
delete optionsDialog;
0 commit comments