Skip to content

Commit

Permalink
Avoid error box when mouse coordinate transform fails
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 17, 2016
1 parent 87661a0 commit b6c2529
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/core/qgscoordinateutils.cpp
Expand Up @@ -68,7 +68,14 @@ QString QgsCoordinateUtils::formatCoordinateForProject( const QgsPoint& point, c
{
// need to transform to geographic coordinates
QgsCoordinateTransform ct( destCrs, QgsCoordinateReferenceSystem( GEOSRID ) );
geo = ct.transform( point );
try
{
geo = ct.transform( point );
}
catch ( QgsCsException& )
{
return QString();
}
}

if ( format == "DM" )
Expand Down

0 comments on commit b6c2529

Please sign in to comment.