Skip to content
Permalink
Browse files
Do not validate the geometry if it is known to be valid - save some time
  • Loading branch information
wonder-sk committed Nov 11, 2011
1 parent b07ccb3 commit 8422a9d
Showing 1 changed file with 8 additions and 2 deletions.
@@ -954,11 +954,17 @@ void SelectionFeature::setSelectedFeature( QgsFeatureId featureId,

void SelectionFeature::validateGeometry( QgsGeometry *g )
{
QgsDebugMsg( "validating geometry" );

if ( g == NULL )
g = mFeature->geometry();

if ( g->isGeosValid() )
{
QgsDebugMsg( "geometry is valid - not validating." );
return;
}

QgsDebugMsg( "validating geometry" );

g->validateGeometry( mGeomErrors );

while ( !mGeomErrorMarkers.isEmpty() )

0 comments on commit 8422a9d

Please sign in to comment.