File tree Expand file tree Collapse file tree 1 file changed +29
-16
lines changed Expand file tree Collapse file tree 1 file changed +29
-16
lines changed Original file line number Diff line number Diff line change @@ -454,31 +454,44 @@ void QgsLineStringV2::append( const QgsLineStringV2* line )
454
454
{
455
455
mX .pop_back ();
456
456
mY .pop_back ();
457
- mZ .pop_back ();
458
- mM .pop_back ();
457
+
458
+ if ( is3D () )
459
+ {
460
+ mZ .pop_back ();
461
+ }
462
+ if ( isMeasure () )
463
+ {
464
+ mM .pop_back ();
465
+ }
459
466
}
460
467
461
468
mX += line->mX ;
462
469
mY += line->mY ;
463
470
464
- if ( line->is3D () )
465
- {
466
- mZ += line->mZ ;
467
- }
468
- else
471
+ if ( is3D () )
469
472
{
470
- // if append line does not have z coordinates, fill with 0 to match number of points in final line
471
- mZ .insert ( mZ .count (), mX .size () - mZ .size (), 0 );
473
+ if ( line->is3D () )
474
+ {
475
+ mZ += line->mZ ;
476
+ }
477
+ else
478
+ {
479
+ // if append line does not have z coordinates, fill with 0 to match number of points in final line
480
+ mZ .insert ( mZ .count (), mX .size () - mZ .size (), 0 );
481
+ }
472
482
}
473
483
474
- if ( line->is3D () )
475
- {
476
- mM += line->mM ;
477
- }
478
- else
484
+ if ( isMeasure () )
479
485
{
480
- // if append line does not have m values, fill with 0 to match number of points in final line
481
- mM .insert ( mM .count (), mX .size () - mM .size (), 0 );
486
+ if ( line->isMeasure () )
487
+ {
488
+ mM += line->mM ;
489
+ }
490
+ else
491
+ {
492
+ // if append line does not have m values, fill with 0 to match number of points in final line
493
+ mM .insert ( mM .count (), mX .size () - mM .size (), 0 );
494
+ }
482
495
}
483
496
484
497
mBoundingBox = QgsRectangle (); // set bounding box invalid
You can’t perform that action at this time.
0 commit comments