Skip to content
Permalink
Browse files

Editorwidgets: Save "label on top" and "editable" settings to project

Fix #10667
  • Loading branch information
m-kuhn committed Jun 23, 2014
1 parent a843038 commit 39e5c85202f347b3af87201861f084b0d2aac18c
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/gui/editorwidgets/core/qgseditorwidgetregistry.cpp
@@ -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
@@ -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 );

0 comments on commit 39e5c85

Please sign in to comment.
You can’t perform that action at this time.