[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).
This commit is contained in:
Matthias Kuhn 2012-11-09 10:53:43 +01:00
parent 1dacbd63fe
commit 36452a8e24

View File

@ -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 )