Skip to content
Permalink
Browse files

Catch transform errors for annotations

  • Loading branch information
nyalldawson committed Feb 1, 2017
1 parent 1e5a93b commit 9fcc13083897d8542f5f0b64a668a027b42ce655
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/gui/qgsmapcanvasannotationitem.cpp
@@ -57,7 +57,14 @@ void QgsMapCanvasAnnotationItem::updatePosition()
if ( mAnnotation->hasFixedMapPosition() )
{
QgsCoordinateTransform t( mAnnotation->mapPositionCrs(), mMapCanvas->mapSettings().destinationCrs() );
setPos( toCanvasCoordinates( t.transform( mAnnotation->mapPosition() ) ) );
QgsPoint coord = mAnnotation->mapPosition();
try
{
coord = t.transform( coord );
}
catch ( QgsCsException& )
{}
setPos( toCanvasCoordinates( coord ) );
}
else
{

0 comments on commit 9fcc130

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