Skip to content

Commit 6bcba42

Browse files
committedMar 18, 2019
Remove unneeded code
1 parent 5f4308c commit 6bcba42

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed
 

‎src/app/qgsgeometryvalidationdock.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -265,39 +265,15 @@ void QgsGeometryValidationDock::onCurrentLayerChanged( QgsMapLayer *layer )
265265

266266
if ( mCurrentLayer )
267267
{
268-
disconnect( mCurrentLayer, &QgsVectorLayer::editingStarted, this, &QgsGeometryValidationDock::onLayerEditingStatusChanged );
269-
disconnect( mCurrentLayer, &QgsVectorLayer::editingStopped, this, &QgsGeometryValidationDock::onLayerEditingStatusChanged );
270268
disconnect( mCurrentLayer, &QgsVectorLayer::destroyed, this, &QgsGeometryValidationDock::onLayerDestroyed );
271269
}
272270

273271
mCurrentLayer = qobject_cast<QgsVectorLayer *>( layer );
274272

275273
if ( mCurrentLayer )
276274
{
277-
connect( mCurrentLayer, &QgsVectorLayer::editingStarted, this, &QgsGeometryValidationDock::onLayerEditingStatusChanged );
278-
connect( mCurrentLayer, &QgsVectorLayer::editingStopped, this, &QgsGeometryValidationDock::onLayerEditingStatusChanged );
279275
connect( mCurrentLayer, &QgsVectorLayer::destroyed, this, &QgsGeometryValidationDock::onLayerDestroyed );
280276
}
281-
282-
onLayerEditingStatusChanged();
283-
}
284-
285-
void QgsGeometryValidationDock::onLayerEditingStatusChanged()
286-
{
287-
bool enabled = false;
288-
if ( mCurrentLayer && mCurrentLayer->isSpatial() && mCurrentLayer->isEditable() )
289-
{
290-
const QList<QgsGeometryCheckFactory *> topologyCheckFactories = QgsAnalysis::instance()->geometryCheckRegistry()->geometryCheckFactories( mCurrentLayer, QgsGeometryCheck::LayerCheck, QgsGeometryCheck::Flag::AvailableInValidation );
291-
const QStringList activeChecks = mCurrentLayer->geometryOptions()->geometryChecks();
292-
for ( const QgsGeometryCheckFactory *factory : topologyCheckFactories )
293-
{
294-
if ( activeChecks.contains( factory->id() ) )
295-
{
296-
enabled = true;
297-
break;
298-
}
299-
}
300-
}
301277
}
302278

303279
void QgsGeometryValidationDock::onLayerDestroyed( QObject *layer )

‎src/app/qgsgeometryvalidationdock.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ class QgsGeometryValidationDock : public QgsDockWidget, public Ui_QgsGeometryVal
4747
void updateCurrentError();
4848
void onCurrentErrorChanged( const QModelIndex &current, const QModelIndex &previous );
4949
void onCurrentLayerChanged( QgsMapLayer *layer );
50-
void onLayerEditingStatusChanged();
5150
void onLayerDestroyed( QObject *layer );
5251
void gotoNextError();
5352
void gotoPreviousError();

0 commit comments

Comments
 (0)
Please sign in to comment.