Skip to content

Commit

Permalink
Editorwidgets: Save "label on top" and "editable" settings to project
Browse files Browse the repository at this point in the history
Fix #10667
  • Loading branch information
m-kuhn committed Jun 23, 2014
1 parent a843038 commit 39e5c85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/editorwidgets/core/qgseditorwidgetregistry.cpp
Expand Up @@ -155,6 +155,8 @@ void QgsEditorWidgetRegistry::readMapLayer( QgsMapLayer* mapLayer, const QDomEle
cfg = mWidgetFactories[ewv2Type]->readEditorConfig( ewv2CfgElem, vectorLayer, idx );
}

vectorLayer->setFieldEditable( idx, ewv2CfgElem.attribute( "fieldEditable" ) == "1" );
vectorLayer->setLabelOnTop( idx, ewv2CfgElem.attribute( "labelOnTop" ) == "1" );
vectorLayer->setEditorWidgetV2Config( idx, cfg );
}
else
Expand Down Expand Up @@ -213,6 +215,8 @@ void QgsEditorWidgetRegistry::writeMapLayer( QgsMapLayer* mapLayer, QDomElement&
if ( mWidgetFactories.contains( widgetType ) )
{
QDomElement ewv2CfgElem = doc.createElement( "widgetv2config" );
ewv2CfgElem.setAttribute( "fieldEditable", vectorLayer->fieldEditable( idx ) );
ewv2CfgElem.setAttribute( "labelOnTop", vectorLayer->labelOnTop( idx ) );

mWidgetFactories[widgetType]->writeConfig( vectorLayer->editorWidgetV2Config( idx ), ewv2CfgElem, doc, vectorLayer, idx );

Expand Down

0 comments on commit 39e5c85

Please sign in to comment.