@@ -82,9 +82,9 @@ QgsMapSaveDialog::QgsMapSaveDialog( QWidget *parent, QgsMapCanvas *mapCanvas, co
8282 }
8383 mDrawDecorations ->setText ( tr ( " Draw active decorations: %1" ).arg ( !activeDecorations.isEmpty () ? activeDecorations : tr ( " none" ) ) );
8484
85- connect ( mResolutionSpinBox , static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this , &QgsMapSaveDialog::updateDpi );
86- connect ( mOutputWidthSpinBox , static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this , &QgsMapSaveDialog::updateOutputWidth );
87- connect ( mOutputHeightSpinBox , static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this , &QgsMapSaveDialog::updateOutputHeight );
85+ connect ( mResolutionSpinBox , & QSpinBox::editingFinished, this , [ = ] { updateDpi ( mResolutionSpinBox -> value () ); } );
86+ connect ( mOutputWidthSpinBox , & QSpinBox::editingFinished, this , [ = ] { updateOutputWidth ( mOutputWidthSpinBox -> value () );} );
87+ connect ( mOutputHeightSpinBox , & QSpinBox::editingFinished, this , [ = ] { updateOutputWidth ( mOutputHeightSpinBox -> value () );} );
8888 connect ( mExtentGroupBox , &QgsExtentGroupBox::extentChanged, this , &QgsMapSaveDialog::updateExtent );
8989 connect ( mScaleWidget , &QgsScaleWidget::scaleChanged, this , &QgsMapSaveDialog::updateScale );
9090 connect ( mLockAspectRatio , &QgsRatioLockButton::lockChanged, this , &QgsMapSaveDialog::lockChanged );
@@ -230,7 +230,7 @@ void QgsMapSaveDialog::updateScale( double scale )
230230 calculator.setMapUnits ( mExtentGroupBox ->currentCrs ().mapUnits () );
231231 calculator.setDpi ( mDpi );
232232
233- double oldScale = 1 / ( calculator.calculate ( mExtent , mSize .width () ) );
233+ double oldScale = calculator.calculate ( mExtent , mSize .width () );
234234 double scaleRatio = scale / oldScale;
235235 mExtent .scale ( scaleRatio );
236236 mExtentGroupBox ->setOutputExtentFromUser ( mExtent , mExtentGroupBox ->currentCrs () );
@@ -299,6 +299,7 @@ void QgsMapSaveDialog::applyMapSettings( QgsMapSettings &mapSettings )
299299 mapSettings.setOutputDpi ( dpi () );
300300 mapSettings.setBackgroundColor ( mMapCanvas ->canvasColor () );
301301 mapSettings.setRotation ( mMapCanvas ->rotation () );
302+ mapSettings.setEllipsoid ( QgsProject::instance ()->ellipsoid () );
302303 mapSettings.setLayers ( mMapCanvas ->layers () );
303304 mapSettings.setLabelingEngineSettings ( mMapCanvas ->mapSettings ().labelingEngineSettings () );
304305 mapSettings.setTransformContext ( QgsProject::instance ()->transformContext () );
0 commit comments