Skip to content

Commit 727d66a

Browse files
committedNov 30, 2012
Fix saving of excluded attributes for wms/wfs server
1 parent 9cb4602 commit 727d66a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
 

‎src/app/qgsfieldsproperties.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,8 @@ void QgsFieldsProperties::on_mEditorLayoutComboBox_currentIndexChanged( int inde
807807

808808
void QgsFieldsProperties::apply()
809809
{
810+
QSet<QString> excludeAttributesWMS, excludeAttributesWFS;
811+
810812
for ( int i = 0; i < mAttributesList->rowCount(); i++ )
811813
{
812814
int idx = mAttributesList->item( i, attrIdCol )->text().toInt();
@@ -865,6 +867,15 @@ void QgsFieldsProperties::apply()
865867
case QgsVectorLayer::UuidGenerator:
866868
break;
867869
}
870+
871+
if ( mAttributesList->item( i, attrWMSCol )->checkState() == Qt::Unchecked )
872+
{
873+
excludeAttributesWMS.insert( mAttributesList->item( i, attrNameCol )->text() );
874+
}
875+
if ( mAttributesList->item( i, attrWFSCol )->checkState() == Qt::Unchecked )
876+
{
877+
excludeAttributesWFS.insert( mAttributesList->item( i, attrNameCol )->text() );
878+
}
868879
}
869880

870881
//tabs and groups
@@ -879,4 +890,7 @@ void QgsFieldsProperties::apply()
879890
mLayer->setEditorLayout(( QgsVectorLayer::EditorLayout )mEditorLayoutComboBox->currentIndex() );
880891
mLayer->setEditForm( leEditForm->text() );
881892
mLayer->setEditFormInit( leEditFormInit->text() );
893+
894+
mLayer->setExcludeAttributesWMS( excludeAttributesWMS );
895+
mLayer->setExcludeAttributesWFS( excludeAttributesWFS );
882896
}

0 commit comments

Comments
 (0)
Please sign in to comment.