@@ -203,8 +203,6 @@ void QgsComposerMap::draw( QPainter *painter, const QgsRectangle& extent, QSizeF
203203
204204QgsMapSettings QgsComposerMap::mapSettings ( const QgsRectangle& extent, QSizeF size, int dpi ) const
205205{
206- const QgsMapSettings &ms = mComposition ->mapSettings ();
207-
208206 QgsExpressionContext expressionContext = createExpressionContext ();
209207
210208 QgsMapSettings jobMapSettings;
@@ -215,7 +213,6 @@ QgsMapSettings QgsComposerMap::mapSettings( const QgsRectangle& extent, QSizeF s
215213 jobMapSettings.setOutputDpi ( dpi );
216214 jobMapSettings.setMapUnits ( mCrs .mapUnits () );
217215 jobMapSettings.setBackgroundColor ( Qt::transparent );
218- jobMapSettings.setOutputImageFormat ( ms.outputImageFormat () );
219216 jobMapSettings.setRotation ( mEvaluatedMapRotation );
220217
221218 // set layers to render
@@ -238,8 +235,6 @@ QgsMapSettings QgsComposerMap::mapSettings( const QgsRectangle& extent, QSizeF s
238235 }
239236 jobMapSettings.setLayers ( layers );
240237 jobMapSettings.setLayerStyleOverrides ( layerStyleOverridesToRender ( expressionContext ) );
241- jobMapSettings.setFlags ( ms.flags () );
242- jobMapSettings.setFlag ( QgsMapSettings::DrawSelection, false );
243238
244239 if ( mComposition ->plotStyle () == QgsComposition::Print ||
245240 mComposition ->plotStyle () == QgsComposition::Postscript )
@@ -252,8 +247,10 @@ QgsMapSettings QgsComposerMap::mapSettings( const QgsRectangle& extent, QSizeF s
252247 jobMapSettings.setExpressionContext ( context );
253248
254249 // composer-specific overrides of flags
255- jobMapSettings.setFlag ( QgsMapSettings::ForceVectorOutput ); // force vector output (no caching of marker images etc.)
250+ jobMapSettings.setFlag ( QgsMapSettings::ForceVectorOutput, true ); // force vector output (no caching of marker images etc.)
251+ jobMapSettings.setFlag ( QgsMapSettings::Antialiasing, true );
256252 jobMapSettings.setFlag ( QgsMapSettings::DrawEditingInfo, false );
253+ jobMapSettings.setFlag ( QgsMapSettings::DrawSelection, false );
257254 jobMapSettings.setFlag ( QgsMapSettings::UseAdvancedEffects, mComposition ->useAdvancedEffects () ); // respect the composition's useAdvancedEffects flag
258255
259256 jobMapSettings.datumTransformStore ().setDestinationCrs ( mCrs );
0 commit comments