Skip to content
Permalink
Browse files

Fix unit tests and issues with cached layers

This code has been funded by Tuscany Region (Italy) - SITA (CIG: 63526840AE) and commissioned to Gis3W s.a.s.
  • Loading branch information
wonder-sk committed Sep 21, 2015
1 parent d0fcc95 commit 6cc1f4c2cb4bcc877f32320f8120ba24f696bf29
@@ -203,7 +203,7 @@ LayerRenderJobs QgsMapRendererJob::prepareJobs( QPainter* painter, QgsPalLabelin
if ( mCache && ml->type() == QgsMapLayer::VectorLayer )
{
QgsVectorLayer* vl = qobject_cast<QgsVectorLayer *>( ml );
if ( vl->isEditable() || ( labelingEngine && labelingEngine->willUseLayer( vl ) ) )
if ( vl->isEditable() || (( labelingEngine || labelingEngine2 ) && QgsPalLabeling::staticWillUseLayer( vl ) ) )
mCache->clearCacheImage( ml->id() );
}

@@ -2361,7 +2361,10 @@ void QgsPalLayerSettings::registerObstacleFeature( QgsFeature& f, const QgsRende
try
{
if ( obstacleFeature )
{
*obstacleFeature = new QgsLabelFeature( lbl->strId(), lbl, QSizeF( 0, 0 ) );
( *obstacleFeature )->setIsObstacle( true );
}
else
if ( !palLayer->registerFeature( lbl->strId(), lbl, 0, 0 ) )
return;
@@ -63,6 +63,7 @@ void QgsVectorLayerDiagramProvider::init()
mPriority = 1 - mSettings.priority / 10.0; // convert 0..10 --> 1..0
mPlacement = QgsPalLayerSettings::Placement( mSettings.placement );
mLinePlacementFlags = mSettings.placementFlags;
mFlags |= DrawAllLabels;
if ( mSettings.obstacle ) mFlags |= GeometriesAreObstacles;
}

Binary file not shown.

0 comments on commit 6cc1f4c

Please sign in to comment.
You can’t perform that action at this time.