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
Describe the bug
Use a read-only line edit instead of combobox in relation reference doesn't allow to add a child from the parent
How to Reproduce
Consider having 2 tables (parent and child)
Create a relation between them (Project - Propreties - Relations)
Open propreties of child layer and go to the Attributes Form panel
Set the widget type as Relation Reference
Check the Use a read-only line edit instead of combobox
Ok
Add a new feature in parent
When doing this, add a new child feature
Bug --> The field of the parent is empty
If in 5. we do not check Use a read-only line edit instead of combobox, the 9. is fine (we have the (id) of the parent in the field)
QGIS and OS versions
QGIS version
3.16.5-Hannover
QGIS code revision
58ba7c1ed6
Compiled against Qt
5.11.2
Running against Qt
5.11.2
Compiled against GDAL/OGR
3.1.4
Running against GDAL/OGR
3.1.4
Compiled against GEOS
3.8.1-CAPI-1.13.3
Running against GEOS
3.8.1-CAPI-1.13.3
Compiled against SQLite
3.29.0
Running against SQLite
3.29.0
PostgreSQL Client Version
11.5
SpatiaLite Version
4.3.0
QWT Version
6.1.3
QScintilla2 Version
2.10.8
Compiled against PROJ
6.3.2
Running against PROJ
Rel. 6.3.2, May 1st, 2020
OS Version
Windows 10 (10.0)
Active python plugins
actions_for_relations;
geomapfish_locator;
quick_map_services;
db_manager;
processing
The text was updated successfully, but these errors were encountered:
rbovard
added
the
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
label
Apr 15, 2021
When we create a feature from the relation editor, it sets the attribute of the foreign key. But the new feature in the parent layer does not exist yet.
This works well with the combobox which handles yet unregistered values.
The read-only line edit does not support this.
We could implement this, but I am not sure it is worth the effort.
The read-only line edit was added while we didn't have the background loading combobox with completer (we only had a classic combobox, which could cause troubles when you had many entries).
💣 I would rather propose to drop the read-only line edit. 💥
@rbovard would that suit your needs? @m-kuhn we discussed about it in the past, any more thoughts?
We could also keep the option and disable the dropdown (that means to keep an option where we still allow on map identification but disable the dropdown), I think sometimes the lineedit was used to get this kind of UX when it was not possible to create a meaningful text.
3nids
added a commit
to 3nids/QGIS
that referenced
this issue
Jun 2, 2021
Describe the bug
Use a read-only line edit instead of combobox in relation reference doesn't allow to add a child from the parent
How to Reproduce
parent
andchild
)child
layer and go to the Attributes Form panelparent
If in 5. we do not check Use a read-only line edit instead of combobox, the 9. is fine (we have the
(id)
of the parent in the field)QGIS and OS versions
The text was updated successfully, but these errors were encountered: