Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 d3e08da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/plugins/geometry_checker/checks/qgsgeometrycheck.cpp
Expand Up @@ -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;
}

Expand Down

0 comments on commit d3e08da

Please sign in to comment.