@@ -81,9 +81,9 @@ QgsMapSaveDialog::QgsMapSaveDialog( QWidget *parent, QgsMapCanvas *mapCanvas, co
81
81
}
82
82
mDrawDecorations ->setText ( tr ( " Draw active decorations: %1" ).arg ( !activeDecorations.isEmpty () ? activeDecorations : tr ( " none" ) ) );
83
83
84
- connect ( mResolutionSpinBox , static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this , &QgsMapSaveDialog::updateDpi );
85
- connect ( mOutputWidthSpinBox , static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this , &QgsMapSaveDialog::updateOutputWidth );
86
- connect ( mOutputHeightSpinBox , static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this , &QgsMapSaveDialog::updateOutputHeight );
84
+ connect ( mResolutionSpinBox , & QSpinBox::editingFinished, this , [ = ] { updateDpi ( mResolutionSpinBox -> value () ); } );
85
+ connect ( mOutputWidthSpinBox , & QSpinBox::editingFinished, this , [ = ] { updateOutputWidth ( mOutputWidthSpinBox -> value () );} );
86
+ connect ( mOutputHeightSpinBox , & QSpinBox::editingFinished, this , [ = ] { updateOutputWidth ( mOutputHeightSpinBox -> value () );} );
87
87
connect ( mExtentGroupBox , &QgsExtentGroupBox::extentChanged, this , &QgsMapSaveDialog::updateExtent );
88
88
connect ( mScaleWidget , &QgsScaleWidget::scaleChanged, this , &QgsMapSaveDialog::updateScale );
89
89
connect ( mLockAspectRatio , &QgsRatioLockButton::lockChanged, this , &QgsMapSaveDialog::lockChanged );
@@ -229,7 +229,7 @@ void QgsMapSaveDialog::updateScale( double scale )
229
229
calculator.setMapUnits ( mExtentGroupBox ->currentCrs ().mapUnits () );
230
230
calculator.setDpi ( mDpi );
231
231
232
- double oldScale = 1 / ( calculator.calculate ( mExtent , mSize .width () ) );
232
+ double oldScale = calculator.calculate ( mExtent , mSize .width () );
233
233
double scaleRatio = scale / oldScale;
234
234
mExtent .scale ( scaleRatio );
235
235
mExtentGroupBox ->setOutputExtentFromUser ( mExtent , mExtentGroupBox ->currentCrs () );
@@ -298,6 +298,7 @@ void QgsMapSaveDialog::applyMapSettings( QgsMapSettings &mapSettings )
298
298
mapSettings.setOutputDpi ( dpi () );
299
299
mapSettings.setBackgroundColor ( mMapCanvas ->canvasColor () );
300
300
mapSettings.setRotation ( mMapCanvas ->rotation () );
301
+ mapSettings.setEllipsoid ( QgsProject::instance ()->ellipsoid () );
301
302
mapSettings.setLayers ( mMapCanvas ->layers () );
302
303
mapSettings.setLabelingEngineSettings ( mMapCanvas ->mapSettings ().labelingEngineSettings () );
303
304
mapSettings.setTransformContext ( QgsProject::instance ()->transformContext () );
0 commit comments