[QGIS Commit] r12501 - trunk/qgis/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Dec 17 07:54:53 EST 2009


Author: mhugent
Date: 2009-12-17 07:54:53 -0500 (Thu, 17 Dec 2009)
New Revision: 12501

Modified:
   trunk/qgis/src/core/qgsgeometry.cpp
Log:
Fix for bug #2291, Reshape Features tool crashes on right mouse click

Modified: trunk/qgis/src/core/qgsgeometry.cpp
===================================================================
--- trunk/qgis/src/core/qgsgeometry.cpp	2009-12-17 11:51:07 UTC (rev 12500)
+++ trunk/qgis/src/core/qgsgeometry.cpp	2009-12-17 12:54:53 UTC (rev 12501)
@@ -3223,6 +3223,10 @@
 /**Replaces a part of this geometry with another line*/
 int QgsGeometry::reshapeGeometry( const QList<QgsPoint>& reshapeWithLine )
 {
+  if ( reshapeWithLine.size() < 2 )
+  {
+    return 1;
+  }
   if ( type() == QGis::Point )
   {
     return 1; //cannot reshape points



More information about the QGIS-commit mailing list