-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple widgets of same relation #38331
Conversation
…no info stored in the editFormConfig (and if so, then it would lead to issues, since elementDev->name() is not necessarily unique)
…figuration - stored in a QgsAttributeEditorElement
…e in the widget configuration
…eSuppressFormPopup state after the widget has been created
…like the displayName what would be the relation-name) to set the relation in the settings
means the force-suppress-popup and nm-rel in the editFormConfig are written according to the first instance of the widget-tree from same type and name for each relation. and on creating the widget it reads first this config and is only overwritten if there are specific widget config available.
show info message for relation and qml/html widget, where to configure it select the dropped feature
renamed cardinality to nmRelationId since it's not a cardinality - it's the id of the relation connected through the many-to-many cardinality in this relation editor widget
…previous versions
…t it when false) and use more specific function descriptions
… and the force-suppress-popup the legacy way over setWidgetConfig to keep it backwards compatible
python/gui/auto_generated/editorwidgets/qgsrelationwidgetwrapper.sip.in
Outdated
Show resolved
Hide resolved
Why the move of all the classes from gui to core? I didn't look in depth, but couldn't immediately see a good reason for this change. |
Ignore that, I read the diff wrong! |
Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
No stale. @m-kuhn can we finalize that? |
The relation editor widget ("cardinality" and "force hide form on add feature") are now configurable in the widget config, means not per relation but per relation editor widget that is created in the drag and drop (like show labels and button visibility).
This is mainly needed for relations to a reference-table providing multiple many-to-many connections. This implementation resolves #37675
Additionally the dialog opened with double click functionality on field- and relation-items is removed since it had no impact anyway. Same for QML/HTML widget in the "Available Widgets" tree.
Backward compatibility notes:
On reading a project configured with older QGIS versions, the config is taken over and written into the new widget configuration. On changing the settings, the config of the first instance of this relation editor widget is written the old way as well. So on reopening on an older QGIS, the new configuration is readable there.
On autogenerated forms you cannot configure relation editor widgets anymore (since
QgsAttributeRelationEdit
is removed). But if it has been configured in an older QGIS, the attribute form will still read this configuration.On reading the configuration the old way with
editFormConfig().widgetConfig()
over the API or third-party-applications with meta objects, this is still possible. On setting it, it will write it into the first instance of the relation editor widget as well.The "force hide form popup on add feature" is working weird
When I activate the checkbox on one widget (or on one relation) then it's taken over for all the relation editor widgets. This bug (?) has been there before and is not fixed in this PR. I'll plan a follow up for that.