Skip to content

Commit b210e7d

Browse files
committed
Single geometry checks are done just in time
1 parent 46efc9a commit b210e7d

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

src/app/qgsgeometryvalidationmodel.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,13 @@ QVariant QgsGeometryValidationModel::data( const QModelIndex &index, int role )
131131

132132
case Qt::DecorationRole:
133133
{
134+
#if 0
134135
if ( mGeometryValidationService->validationActive( mCurrentLayer, featureItem.fid ) )
135136
return QgsApplication::getThemeIcon( "/mActionTracing.svg" );
136137
else
137138
return QVariant();
139+
#endif
140+
break;
138141
}
139142

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

215218
// The last check for this feature finished: remove
216-
if ( featureIdx > -1 && errors.empty() && !mGeometryValidationService->validationActive( layer, fid ) )
219+
if ( featureIdx > -1 && errors.empty() ) // && !mGeometryValidationService->validationActive( layer, fid ) )
217220
{
218221
if ( mCurrentLayer == layer )
219222
beginRemoveRows( QModelIndex(), featureIdx, featureIdx );

src/app/qgsgeometryvalidationservice.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ QgsGeometryValidationService::QgsGeometryValidationService( QgsProject *project
3535
connect( project, &QgsProject::layersAdded, this, &QgsGeometryValidationService::onLayersAdded );
3636
}
3737

38-
bool QgsGeometryValidationService::validationActive( QgsVectorLayer *layer, QgsFeatureId feature ) const
39-
{
40-
return false;
41-
}
42-
4338
void QgsGeometryValidationService::fixError( const QgsGeometryCheckError *error, int method )
4439
{
4540
QgsGeometryCheck::Changes changes;

src/app/qgsgeometryvalidationservice.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,6 @@ class QgsGeometryValidationService : public QObject
6060
QgsGeometryValidationService( QgsProject *project );
6161
~QgsGeometryValidationService() = default;
6262

63-
/**
64-
* Returns if a validation is active for the specified \a feature on
65-
* \a layer.
66-
*/
67-
bool validationActive( QgsVectorLayer *layer, QgsFeatureId feature ) const;
68-
6963
void fixError( const QgsGeometryCheckError *error, int method );
7064

7165
void triggerTopologyChecks( QgsVectorLayer *layer );

0 commit comments

Comments
 (0)