Bug report #19342

Relation reference widget: data is displayed in combobox but not in embedded form

Added by Andreas Neumann over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Normal
Assignee:David Signer
Category:Edit widget
Affected QGIS version:3.3(master) Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27170

Description

When one uses a relation reference widget, where the embedded is also displayed, data is shown in the combobox, but not in the embedded form.

Can be reproduced with the Erdwärmesonden-Projekt of the Kanton of Zug.

This used to work fine in 3.0x, but fails in both 3.2 and master.

Data-Dump and up-to-date project can be made available.

qgis_data_in_embedded_form_missing.png - Screenshot showing missing data in embedded form (68.9 KB) Andreas Neumann, 2018-07-05 03:26 PM

Associated revisions

Revision 4c2e5ff4
Added by David Signer over 6 years ago

Get mFeature before updating attributeform

The issue was, that the attributeform didn't got updated in case there was the first entry in the combobox selected.
If there was not the first combobox entry selected, there has been a setindex after the initialization and the attributeform got updated.
But the first entry needs this call.

Fix #19342

Revision 815b8034
Added by David Signer over 6 years ago

Get mFeature before updating attributeform

The issue was, that the attributeform didn't got updated in case there was the first entry in the combobox selected.
If there was not the first combobox entry selected, there has been a setindex after the initialization and the attributeform got updated.
But the first entry needs this call.

Fix #19342

(cherry-picked from 4c2e5ff4f582aae8a533d962e3c18c034420d8ac)

History

#2 Updated by Andreas Neumann over 6 years ago

Oddly enough, it doesn't happen with every relation reference widget, only with some. Still have to investigate if there are different settings.

In the Kanton Zug EWS example, the issue appears in tab "Eigentümer" and "Heizungsplaner", but not in "Bohrfirma".

#3 Updated by David Signer over 6 years ago

I guess, it has nothing to do with the single references (like Eigentümer, Bohrfirma etc.). It has to do what index in the combo is selected. It's only failing when the first value in the combo box is selected (index 0). Can you confirm that?

#4 Updated by Andreas Neumann over 6 years ago

I confirm that it is always the first value in the combobox.

However, I don't know why it is at the first entry - because with strict alphabetic ordering (like the rest of the values), it usually wouldn't be at first position.

Also, I checked again in version 3.0x. There, the entries are also at the first position in the combobox (like in master), but the values in the forms are properly displayed.

Something must have changed between 3.0x and 3.2x/master in this respect.

#5 Updated by David Signer over 6 years ago

Yes, there has been a change. Checking that out.

#7 Updated by David Signer over 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF