mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
catch transformation exceptions in pal labeling (fixes #7730)
This commit is contained in:
parent
5ab0df5262
commit
6831498484
@ -1771,7 +1771,17 @@ void QgsPalLayerSettings::registerFeature( QgsVectorLayer* layer, QgsFeature& f
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( ct ) // reproject the geometry if necessary
|
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 ) )
|
if ( !checkMinimumSizeMM( context, geom, minFeatureSize ) )
|
||||||
{
|
{
|
||||||
@ -2069,7 +2079,15 @@ void QgsPalLayerSettings::registerFeature( QgsVectorLayer* layer, QgsFeature& f
|
|||||||
double z = 0;
|
double z = 0;
|
||||||
if ( ct )
|
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;
|
xPos += xdiff;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user