mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-08 00:02:35 -05:00
Connect allowed gaps layer saving to master layer
This commit is contained in:
parent
66d9e1887f
commit
af1916f9f2
@ -269,6 +269,14 @@ void QgsGeometryValidationService::enableLayerChecks( QgsVectorLayer *layer )
|
||||
{
|
||||
const QVariantMap checkConfiguration = layer->geometryOptions()->checkConfiguration( checkId );
|
||||
topologyChecks.append( factory->createGeometryCheck( checkInformation.context.get(), checkConfiguration ) );
|
||||
|
||||
if ( checkConfiguration.value( QStringLiteral( "allowedGapsEnabled" ) ).toBool() )
|
||||
{
|
||||
QgsVectorLayer *gapsLayer = QgsProject::instance()->mapLayer<QgsVectorLayer *>( checkConfiguration.value( "allowedGapsLayer" ).toString() );
|
||||
connect( layer, &QgsVectorLayer::editingStarted, gapsLayer, [gapsLayer] { gapsLayer->startEditing(); } );
|
||||
connect( layer, &QgsVectorLayer::beforeRollBack, gapsLayer, [gapsLayer] { gapsLayer->rollBack(); } );
|
||||
connect( layer, &QgsVectorLayer::editingStopped, gapsLayer, [gapsLayer] { gapsLayer->commitChanges(); } );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user