Skip to content

Commit

Permalink
Update checkbox is available for nogeom layers
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere authored and nyalldawson committed Oct 6, 2023
1 parent 601cd4d commit f5230b1
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/app/qgsprojectproperties.cpp
Expand Up @@ -919,18 +919,23 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
psb->setValue( QgsProject::instance()->readNumEntry( QStringLiteral( "WFSLayersPrecision" ), "/" + currentLayer->id(), 8 ) );
twWFSLayers->setCellWidget( j, 2, psb );

if ( ( provider->capabilities() & QgsVectorDataProvider::ChangeAttributeValues ) && ( provider->capabilities() & QgsVectorDataProvider::ChangeGeometries ) )
if ( ( provider->capabilities() & QgsVectorDataProvider::ChangeAttributeValues ) )
{
QCheckBox *cbu = new QCheckBox();
cbu->setChecked( wfstUpdateLayerIdList.contains( currentLayer->id() ) );
twWFSLayers->setCellWidget( j, 3, cbu );
if ( ! currentLayer->isSpatial() or ( provider->capabilities() & QgsVectorDataProvider::ChangeGeometries ) )
{
QCheckBox *cbu = new QCheckBox();
cbu->setChecked( wfstUpdateLayerIdList.contains( currentLayer->id() ) );
twWFSLayers->setCellWidget( j, 3, cbu );
}
}

if ( ( provider->capabilities() & QgsVectorDataProvider::AddFeatures ) )
{
QCheckBox *cbi = new QCheckBox();
cbi->setChecked( wfstInsertLayerIdList.contains( currentLayer->id() ) );
twWFSLayers->setCellWidget( j, 4, cbi );
}

if ( ( provider->capabilities() & QgsVectorDataProvider::DeleteFeatures ) )
{
QCheckBox *cbd = new QCheckBox();
Expand Down

0 comments on commit f5230b1

Please sign in to comment.