Skip to content
Permalink
Browse files
catch transformation exceptions in pal labeling (fixes #7730)
  • Loading branch information
jef-n committed Jul 19, 2013
1 parent 5ab0df5 commit 683149848407c84523fb45cc2ae6b360acb5f89d
Showing with 20 additions and 2 deletions.
  1. +20 −2 src/core/qgspallabeling.cpp
@@ -1771,7 +1771,17 @@ void QgsPalLayerSettings::registerFeature( QgsVectorLayer* layer, QgsFeature& f
}

if ( ct ) // reproject the geometry if necessary
geom->transform( *ct );
{
try
{
geom->transform( *ct );
}
catch ( QgsCsException &cse )
{
QgsDebugMsgLevel( QString( "Ignoring feature %1 due transformation exception" ).arg( f.id() ), 4 );
return;
}
}

if ( !checkMinimumSizeMM( context, geom, minFeatureSize ) )
{
@@ -2069,7 +2079,15 @@ void QgsPalLayerSettings::registerFeature( QgsVectorLayer* layer, QgsFeature& f
double z = 0;
if ( ct )
{
ct->transformInPlace( xPos, yPos, z );
try
{
ct->transformInPlace( xPos, yPos, z );
}
catch ( QgsCsException &e )
{
QgsDebugMsgLevel( QString( "Ignoring feature %1 due transformation exception on data-defined position" ).arg( f.id() ), 4 );
return;
}
}

xPos += xdiff;

0 comments on commit 6831498

Please sign in to comment.