Fix adding curves with Z/M to non Z/M compound curves

Z/M for these curves should be dropped to ensure consistent
dimensionality for the whole compound curve
This commit is contained in:
Nyall Dawson 2017-09-20 18:20:17 +10:00
parent f268ccc837
commit 148a906cb5

View File

@ -407,10 +407,18 @@ void QgsCompoundCurve::addCurve( QgsCurve *c )
{
c->addZValue();
}
else if ( !QgsWkbTypes::hasZ( mWkbType ) && QgsWkbTypes::hasZ( c->wkbType() ) )
{
c->dropZValue();
}
if ( QgsWkbTypes::hasM( mWkbType ) && !QgsWkbTypes::hasM( c->wkbType() ) )
{
c->addMValue();
}
else if ( !QgsWkbTypes::hasM( mWkbType ) && QgsWkbTypes::hasM( c->wkbType() ) )
{
c->dropMValue();
}
clearCache();
}
}