Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Gracefully catch transform errors in rubber band geometries
- Loading branch information
Showing
with
9 additions
and
1 deletion.
-
+9
−1
src/gui/qgsrubberband.cpp
|
@@ -311,7 +311,15 @@ void QgsRubberBand::addGeometry( const QgsGeometry &geometry, const QgsCoordinat |
|
|
if ( crs.isValid() ) |
|
|
{ |
|
|
QgsCoordinateTransform ct( crs, ms.destinationCrs(), QgsProject::instance() ); |
|
|
geom.transform( ct ); |
|
|
try |
|
|
{ |
|
|
geom.transform( ct ); |
|
|
} |
|
|
catch ( QgsCsException & ) |
|
|
{ |
|
|
QgsDebugMsg( QStringLiteral( "Could not transform rubber band geometry to map CRS" ) ); |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
QgsWkbTypes::Type geomType = geom.wkbType(); |
|
|