Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Single geometry checks are done just in time
  • Loading branch information
m-kuhn committed Oct 15, 2018
1 parent 46efc9a commit b210e7d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
5 changes: 4 additions & 1 deletion src/app/qgsgeometryvalidationmodel.cpp
Expand Up @@ -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:
Expand Down Expand Up @@ -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 );
Expand Down
5 changes: 0 additions & 5 deletions src/app/qgsgeometryvalidationservice.cpp
Expand Up @@ -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;
Expand Down
6 changes: 0 additions & 6 deletions src/app/qgsgeometryvalidationservice.h
Expand Up @@ -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 );
Expand Down

0 comments on commit b210e7d

Please sign in to comment.