Skip to content
Permalink
Browse files

[FIX]: Build rubberband completely even with incomplete input

An empty polyline in a mulipolyline led to the rubberband ignoring all further polylines.
e.g. addGeometry( [[(1,2)(2,3)][][(2,3)(3,4)]] ) was ignoring the polyline (2,3)(3,4).
  • Loading branch information
m-kuhn committed Nov 9, 2012
1 parent 1dacbd6 commit 36452a8e2415668261c99eebbe7889a35a88ec69
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/gui/qgsrubberband.cpp
@@ -270,6 +270,12 @@ void QgsRubberBand::addGeometry( QgsGeometry* geom, QgsVectorLayer* layer )
for ( int i = 0; i < mline.size(); ++i, ++idx )
{
QgsPolyline line = mline[i];

if ( line.size() == 0 )
{
--idx;
}

for ( int j = 0; j < line.size(); ++j )
{
if ( layer )

0 comments on commit 36452a8

Please sign in to comment.
You can’t perform that action at this time.