File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -300,8 +300,28 @@ void QgsLineStringV2::append( const QgsLineStringV2* line )
300
300
}
301
301
302
302
mCoords += line->mCoords ;
303
- mZ += line->mZ ;
304
- mM += line->mM ;
303
+
304
+ if ( line->is3D () )
305
+ {
306
+ mZ += line->mZ ;
307
+ }
308
+ else
309
+ {
310
+ // if append line does not have z coordinates, fill with 0 to match number of points in final line
311
+ mZ .insert ( mZ .count (), mX .size () - mZ .size (), 0 );
312
+ }
313
+
314
+ if ( line->is3D () )
315
+ {
316
+ mM += line->mM ;
317
+ }
318
+ else
319
+ {
320
+ // if append line does not have m values, fill with 0 to match number of points in final line
321
+ mM .insert ( mM .count (), mX .size () - mM .size (), 0 );
322
+ }
323
+
324
+ mBoundingBox = QgsRectangle (); // set bounding box invalid
305
325
}
306
326
307
327
void QgsLineStringV2::draw ( QPainter& p ) const
You can’t perform that action at this time.
0 commit comments