Skip to content
Permalink
Browse files

fix synchronous geometry validation

  • Loading branch information
jef-n committed May 24, 2012
1 parent d4dcde0 commit 2f440bd88841d6de310867f098bf2237b02c51a3
Showing with 2 additions and 5 deletions.
  1. +1 −3 src/core/qgsgeometry.cpp
  2. +1 −2 src/core/qgsgeometryvalidator.cpp
@@ -6708,9 +6708,7 @@ int QgsGeometry::avoidIntersections()

void QgsGeometry::validateGeometry( QList<Error> &errors )
{
QgsGeometryValidator *gv = new QgsGeometryValidator( this, &errors );
gv->start();
delete gv;
QgsGeometryValidator::validateGeometry( this, errors );
}

bool QgsGeometry::isGeosValid()
@@ -328,8 +328,7 @@ void QgsGeometryValidator::addError( QgsGeometry::Error e )
void QgsGeometryValidator::validateGeometry( QgsGeometry *g, QList<QgsGeometry::Error> &errors )
{
QgsGeometryValidator *gv = new QgsGeometryValidator( g, &errors );
connect( gv, SIGNAL( "errorFound( QString, QgsPoint )" ), gv, SLOT( "addError( QString, QgsPoint )" ) );
connect( gv, SIGNAL( "errorFound( QString )" ), gv, SLOT( "addError( QString )" ) );
connect( gv, SIGNAL( errorFound( QgsGeometry::Error ) ), gv, SLOT( addError( QgsGeometry::Error ) ) );
gv->run();
gv->wait();
}

0 comments on commit 2f440bd

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