Skip to content
Permalink
Browse files

[Geometry checker] Make QgsGeometryCheckError::geometry return the ge…

…ometry of the affected part only, if a part is defined
  • Loading branch information
manisandro committed Mar 24, 2016
1 parent 0d21e64 commit d3e08dabd15d6106e7afe9c6379aff61d2c51abf
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/plugins/geometry_checker/checks/qgsgeometrycheck.cpp
@@ -70,7 +70,10 @@ QgsAbstractGeometryV2 *QgsGeometryCheckError::geometry()
{
QgsFeature f;
if ( mCheck->getFeaturePool()->get( featureId(), f ) && f.geometry() )
return f.geometry()->geometry()->clone();
{
QgsAbstractGeometryV2* geom = f.geometry()->geometry();
return mVidx.part >= 0 ? QgsGeomUtils::getGeomPart( geom, mVidx.part )->clone() : geom->clone();
}
return nullptr;
}

0 comments on commit d3e08da

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