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 8422a9da4f54b429b5c3fce100f16c771ba273ed
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/app/qgsmaptoolnodetool.cpp
@@ -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.