Skip to content
Permalink
Browse files
Fix saving of excluded attributes for wms/wfs server
  • Loading branch information
mhugent committed Nov 30, 2012
1 parent 9cb4602 commit 727d66a
Showing 1 changed file with 14 additions and 0 deletions.
@@ -807,6 +807,8 @@ void QgsFieldsProperties::on_mEditorLayoutComboBox_currentIndexChanged( int inde

void QgsFieldsProperties::apply()
{
QSet<QString> excludeAttributesWMS, excludeAttributesWFS;

for ( int i = 0; i < mAttributesList->rowCount(); i++ )
{
int idx = mAttributesList->item( i, attrIdCol )->text().toInt();
@@ -865,6 +867,15 @@ void QgsFieldsProperties::apply()
case QgsVectorLayer::UuidGenerator:
break;
}

if ( mAttributesList->item( i, attrWMSCol )->checkState() == Qt::Unchecked )
{
excludeAttributesWMS.insert( mAttributesList->item( i, attrNameCol )->text() );
}
if ( mAttributesList->item( i, attrWFSCol )->checkState() == Qt::Unchecked )
{
excludeAttributesWFS.insert( mAttributesList->item( i, attrNameCol )->text() );
}
}

//tabs and groups
@@ -879,4 +890,7 @@ void QgsFieldsProperties::apply()
mLayer->setEditorLayout(( QgsVectorLayer::EditorLayout )mEditorLayoutComboBox->currentIndex() );
mLayer->setEditForm( leEditForm->text() );
mLayer->setEditFormInit( leEditFormInit->text() );

mLayer->setExcludeAttributesWMS( excludeAttributesWMS );
mLayer->setExcludeAttributesWFS( excludeAttributesWFS );
}

0 comments on commit 727d66a

Please sign in to comment.