Skip to content
Permalink
Browse files

Single geometry checks are done just in time

  • Loading branch information
m-kuhn committed Oct 15, 2018
1 parent 46efc9a commit b210e7dcaade528900475cacd67e01773d642753
@@ -131,10 +131,13 @@ QVariant QgsGeometryValidationModel::data( const QModelIndex &index, int role )

case Qt::DecorationRole:
{
#if 0
if ( mGeometryValidationService->validationActive( mCurrentLayer, featureItem.fid ) )
return QgsApplication::getThemeIcon( "/mActionTracing.svg" );
else
return QVariant();
#endif
break;
}

case GeometryCheckErrorRole:
@@ -213,7 +216,7 @@ void QgsGeometryValidationModel::onGeometryCheckCompleted( QgsVectorLayer *layer
int featureIdx = errorsForFeature( layer, fid );

// The last check for this feature finished: remove
if ( featureIdx > -1 && errors.empty() && !mGeometryValidationService->validationActive( layer, fid ) )
if ( featureIdx > -1 && errors.empty() ) // && !mGeometryValidationService->validationActive( layer, fid ) )
{
if ( mCurrentLayer == layer )
beginRemoveRows( QModelIndex(), featureIdx, featureIdx );
@@ -35,11 +35,6 @@ QgsGeometryValidationService::QgsGeometryValidationService( QgsProject *project
connect( project, &QgsProject::layersAdded, this, &QgsGeometryValidationService::onLayersAdded );
}

bool QgsGeometryValidationService::validationActive( QgsVectorLayer *layer, QgsFeatureId feature ) const
{
return false;
}

void QgsGeometryValidationService::fixError( const QgsGeometryCheckError *error, int method )
{
QgsGeometryCheck::Changes changes;
@@ -60,12 +60,6 @@ class QgsGeometryValidationService : public QObject
QgsGeometryValidationService( QgsProject *project );
~QgsGeometryValidationService() = default;

/**
* Returns if a validation is active for the specified \a feature on
* \a layer.
*/
bool validationActive( QgsVectorLayer *layer, QgsFeatureId feature ) const;

void fixError( const QgsGeometryCheckError *error, int method );

void triggerTopologyChecks( QgsVectorLayer *layer );

0 comments on commit b210e7d

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