Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Single geometry checks are done just in time
- Loading branch information
|
@@ -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 ); |
|
|