mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
Enable disabled simplification code after merge MTR (1-2)
Disable simplification of geometries in composer by default
This commit is contained in:
parent
20015e723a
commit
4ab24a4f40
@ -45,7 +45,8 @@ public:
|
|||||||
DrawEditingInfo = 0x02,
|
DrawEditingInfo = 0x02,
|
||||||
ForceVectorOutput = 0x04,
|
ForceVectorOutput = 0x04,
|
||||||
UseAdvancedEffects = 0x08,
|
UseAdvancedEffects = 0x08,
|
||||||
DrawLabeling = 0x10
|
DrawLabeling = 0x10,
|
||||||
|
UseRenderingOptimization = 0x20
|
||||||
// TODO: ignore scale-based visibiity (overview)
|
// TODO: ignore scale-based visibiity (overview)
|
||||||
};
|
};
|
||||||
//Q_DECLARE_FLAGS(Flags, Flag)
|
//Q_DECLARE_FLAGS(Flags, Flag)
|
||||||
|
@ -201,13 +201,13 @@ void QgsComposerMap::draw( QPainter *painter, const QgsRectangle& extent, const
|
|||||||
jobMapSettings.setDestinationCrs( ms.destinationCrs() );
|
jobMapSettings.setDestinationCrs( ms.destinationCrs() );
|
||||||
jobMapSettings.setCrsTransformEnabled( ms.hasCrsTransformEnabled() );
|
jobMapSettings.setCrsTransformEnabled( ms.hasCrsTransformEnabled() );
|
||||||
jobMapSettings.setFlags( ms.flags() );
|
jobMapSettings.setFlags( ms.flags() );
|
||||||
/* TODO[MD] fix after merge
|
|
||||||
if ( mComposition->plotStyle() == QgsComposition::Print ||
|
if ( mComposition->plotStyle() == QgsComposition::Print ||
|
||||||
mComposition->plotStyle() == QgsComposition::Postscript )
|
mComposition->plotStyle() == QgsComposition::Postscript )
|
||||||
{
|
{
|
||||||
//if outputing composer, disable optimisations like layer simplification
|
//if outputing composer, disable optimisations like layer simplification
|
||||||
theRendererContext->setUseRenderingOptimization( false );
|
jobMapSettings.setFlag( QgsMapSettings::UseRenderingOptimization, false );
|
||||||
}*/
|
}
|
||||||
|
|
||||||
//update $map variable. Use QgsComposerItem's id since that is user-definable
|
//update $map variable. Use QgsComposerItem's id since that is user-definable
|
||||||
QgsExpression::setSpecialColumn( "$map", QgsComposerItem::id() );
|
QgsExpression::setSpecialColumn( "$map", QgsComposerItem::id() );
|
||||||
|
@ -60,7 +60,8 @@ class CORE_EXPORT QgsMapSettings
|
|||||||
DrawEditingInfo = 0x02,
|
DrawEditingInfo = 0x02,
|
||||||
ForceVectorOutput = 0x04,
|
ForceVectorOutput = 0x04,
|
||||||
UseAdvancedEffects = 0x08,
|
UseAdvancedEffects = 0x08,
|
||||||
DrawLabeling = 0x10
|
DrawLabeling = 0x10,
|
||||||
|
UseRenderingOptimization = 0x20,
|
||||||
// TODO: ignore scale-based visibility (overview)
|
// TODO: ignore scale-based visibility (overview)
|
||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS( Flags, Flag )
|
Q_DECLARE_FLAGS( Flags, Flag )
|
||||||
|
@ -48,6 +48,7 @@ QgsRenderContext QgsRenderContext::fromMapSettings( const QgsMapSettings& mapSet
|
|||||||
ctx.setDrawEditingInformation( mapSettings.testFlag( QgsMapSettings::DrawEditingInfo ) );
|
ctx.setDrawEditingInformation( mapSettings.testFlag( QgsMapSettings::DrawEditingInfo ) );
|
||||||
ctx.setForceVectorOutput( mapSettings.testFlag( QgsMapSettings::ForceVectorOutput ) );
|
ctx.setForceVectorOutput( mapSettings.testFlag( QgsMapSettings::ForceVectorOutput ) );
|
||||||
ctx.setUseAdvancedEffects( mapSettings.testFlag( QgsMapSettings::UseAdvancedEffects ) );
|
ctx.setUseAdvancedEffects( mapSettings.testFlag( QgsMapSettings::UseAdvancedEffects ) );
|
||||||
|
ctx.setUseRenderingOptimization( mapSettings.testFlag( QgsMapSettings::UseRenderingOptimization ) );
|
||||||
ctx.setCoordinateTransform( 0 );
|
ctx.setCoordinateTransform( 0 );
|
||||||
ctx.setSelectionColor( mapSettings.selectionColor() );
|
ctx.setSelectionColor( mapSettings.selectionColor() );
|
||||||
ctx.setRasterScaleFactor( 1.0 );
|
ctx.setRasterScaleFactor( 1.0 );
|
||||||
|
@ -206,6 +206,7 @@ QgsMapCanvas::QgsMapCanvas( QWidget * parent, const char *name )
|
|||||||
this, SLOT( writeProject( QDomDocument & ) ) );
|
this, SLOT( writeProject( QDomDocument & ) ) );
|
||||||
|
|
||||||
mSettings.setFlag( QgsMapSettings::DrawEditingInfo );
|
mSettings.setFlag( QgsMapSettings::DrawEditingInfo );
|
||||||
|
mSettings.setFlag( QgsMapSettings::UseRenderingOptimization );
|
||||||
|
|
||||||
// class that will sync most of the changes between canvas and (legacy) map renderer
|
// class that will sync most of the changes between canvas and (legacy) map renderer
|
||||||
// it is parented to map canvas, will be deleted automatically
|
// it is parented to map canvas, will be deleted automatically
|
||||||
|
Loading…
x
Reference in New Issue
Block a user