Skip to content

Commit

Permalink
Set current feature to evaluate expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasMizera authored and PeterPetrik committed Nov 17, 2020
1 parent 2e982a0 commit 182a388
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/quickgui/plugin/editor/qgsquickvaluerelation.qml
Expand Up @@ -35,6 +35,11 @@ Item {
combobox.popup.open()
}

// Called when data in different fields are changed.
function dataUpdated(feature) {
vrModel.currentFeature = feature
}

id: fieldItem
enabled: !readOnly
height: customStyle.fields.height
Expand Down
10 changes: 10 additions & 0 deletions src/quickgui/plugin/qgsquickfeatureform.qml
Expand Up @@ -442,6 +442,16 @@ Item {
}
}

Connections {
target: form.model
onDataChanged: {
if ( attributeEditorLoader.item && attributeEditorLoader.item.dataUpdated )
{
attributeEditorLoader.item.dataUpdated( form.model.attributeModel.featureLayerPair.feature )
}
}
}

Connections {
target: form
ignoreUnknownSignals: true
Expand Down

0 comments on commit 182a388

Please sign in to comment.