Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
10 changes: 8 additions & 2 deletions src/app/qgsmaptoolnodetool.cpp
Expand Up @@ -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() )
Expand Down

0 comments on commit 8422a9d

Please sign in to comment.