Skip to content

Commit

Permalink
Fix saving of excluded attributes for wms/wfs server
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Nov 30, 2012
1 parent 9cb4602 commit 727d66a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/app/qgsfieldsproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand All @@ -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.