qsavoye / Qfield-Past-Geometry-Plugin

Past geometry in current vector layer
Apache License 2.0
1 stars 0 forks source link

Tiny tweak to get QField expression scopes needed #1

Closed nirvn closed 2 months ago

nirvn commented 3 months ago

Hey there; first of all, great plugin!

One tiny chance that would be worth adding to your code around here: https://github.com/qsavoye/Qfield-Past-Geometry-Plugin/blob/main/main.qml#L39

After you bind the feature form to the newly created feature, you can call overlayFeatureFormDrawer.featureModel.resetAttributes(true) to insure that QField expression scopes (such as @gnss_* variables as well as cloud-related variables) are accessible when default value expressions are evaluated.

qsavoye commented 3 months ago

Thanks @nirvn for the advise, I will correct it.

Is There a way to share the plugin on a QField Platform (such as Qgis plugin) ?

m-kuhn commented 2 months ago

@qsavoye not (yet), but it would be great to make it discoverable by adding the qfield-plugin topic to the repository.