You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When having a parent linked to a child and using the Relation Reference Widget with the option "Embedded Form"...
... changes in this embedded form (where the the parent feature is) are only updated, when something changes on the main form (where the child feature is).
While this scenario works with joined fields
Steps to reproduce the issue
In the attached project I open a form from an "addresse" feature (child feature).
I change something in the embedded form (means the "gebaeude" (parent feature)).
Pressing okay - nothing is saved...
In the attached project I open a form from an "addresse" feature (child feature).
I change something in the embedded form (means the "gebaeude" (parent feature)).
and I change something in the main form
Pressing okay - changes are saved on both features.
When the parent (child-feature) not dirty is, the embedded feature don't get's saved neither.
The save is triggerd somewhere around this
success = mLayer->changeAttributeValues( mFeature.id(), newValues, oldValues, false, context.get() );
in this function:
QgsAttributeForm::saveEdits
With joined fields this works. Without making the parent dirty...
Bei jedem editieren eines Feldes wird updateJoinedFields ausgeführt. Auch bei den Joined oder Embedded (wobei ich natürlich nicht weiss auf welcher ebene). Aber vielleicht würde das auch irgendwie für das andere gehen.
…n the embedded form if existing.
This function is called on aboutToSave, an override of the WidgetWrapper that is triggered via notifyAboutToSave from the attribute form.
This fixesqgis#60806
What is the bug or the crash?
When having a parent linked to a child and using the Relation Reference Widget with the option "Embedded Form"...
... changes in this embedded form (where the the parent feature is) are only updated, when something changes on the main form (where the child feature is).
While this scenario works with joined fields
Steps to reproduce the issue
In the attached project I open a form from an "addresse" feature (child feature).
I change something in the embedded form (means the "gebaeude" (parent feature)).

Pressing okay - nothing is saved...
In the attached project I open a form from an "addresse" feature (child feature).
I change something in the embedded form (means the "gebaeude" (parent feature)).
and I change something in the main form

Pressing okay - changes are saved on both features.
Versions
Supported QGIS version
New profile
Additional context
relrefwidgetembed.zip <- in the zip is a gpkg and in the gpkg is a project...
The text was updated successfully, but these errors were encountered: