[QGIS Commit] r15563 - trunk/qgis/src/core/symbology-ng

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Mar 22 14:42:37 EDT 2011


Author: brushtyler
Date: 2011-03-22 11:42:37 -0700 (Tue, 22 Mar 2011)
New Revision: 15563

Modified:
   trunk/qgis/src/core/symbology-ng/qgslinesymbollayerv2.cpp
Log:
fix related to r15547, manage lines out of the drawing rectangle (empty vectors of points)


Modified: trunk/qgis/src/core/symbology-ng/qgslinesymbollayerv2.cpp
===================================================================
--- trunk/qgis/src/core/symbology-ng/qgslinesymbollayerv2.cpp	2011-03-22 16:45:30 UTC (rev 15562)
+++ trunk/qgis/src/core/symbology-ng/qgslinesymbollayerv2.cpp	2011-03-22 18:42:37 UTC (rev 15563)
@@ -314,6 +314,9 @@
 
 void QgsMarkerLineSymbolLayerV2::renderPolylineInterval( const QPolygonF& points, QgsSymbolV2RenderContext& context )
 {
+  if ( ! points.isEmpty() )
+    return;
+
   QPointF lastPt = points[0];
   double lengthLeft = 0; // how much is left until next marker
   bool first = true;
@@ -383,7 +386,9 @@
 
 void QgsMarkerLineSymbolLayerV2::renderPolylineVertex( const QPolygonF& points, QgsSymbolV2RenderContext& context )
 {
-  QPointF lastPt = points[0];
+  if ( points.isEmpty() )
+    return;
+
   QgsRenderContext& rc = context.renderContext();
 
   double origAngle = mMarker->angle();



More information about the QGIS-commit mailing list