[SCM] qgis branch, master, updated. a2ee769957385f4e084c5e8b6ba178a8c877d1db
Juergen E. Fischer
jef at norbit.de
Tue Mar 20 13:43:02 UTC 2012
The following commit has been merged in the master branch:
commit 6e20c54077baa8b6e5d0bbcc998bbdf279016e3f
Author: Juergen E. Fischer <jef at norbit.de>
Date: Wed Mar 7 07:50:44 2012 +0100
catch transformation exceptions in QgsGrassRegionEdit::transform
diff --git a/src/plugins/grass/qgsgrassregion.cpp b/src/plugins/grass/qgsgrassregion.cpp
index fe3934a..047a27e 100644
--- a/src/plugins/grass/qgsgrassregion.cpp
+++ b/src/plugins/grass/qgsgrassregion.cpp
@@ -132,14 +132,23 @@ void QgsGrassRegionEdit::setTransform()
void QgsGrassRegionEdit::transform( QgsMapCanvas *canvas, QVector<QgsPoint> &points, QgsCoordinateTransform *coordinateTransform, QgsCoordinateTransform::TransformDirection direction )
{
QgsDebugMsg( "Entered" );
+
/** Coordinate transform */
if ( canvas->mapRenderer()->hasCrsTransformEnabled() )
{
//QgsDebugMsg ( "srcCrs = " + coordinateTransform->sourceCrs().toWkt() );
//QgsDebugMsg ( "destCrs = " + coordinateTransform->destCRS().toWkt() );
- for ( int i = 0; i < points.size(); i++ )
+ try
+ {
+ for ( int i = 0; i < points.size(); i++ )
+ {
+ points[i] = coordinateTransform->transform( points[i], direction );
+ }
+ }
+ catch ( QgsCsException &cse )
{
- points[i] = coordinateTransform->transform( points[i], direction );
+ Q_UNUSED( cse );
+ QgsDebugMsg( QString( "transformation failed: %1" ).arg( cse.what() ) );
}
}
}
--
The Quantum GIS in Debian project
More information about the Pkg-grass-devel
mailing list