Skip to content

WIP add remove button to custom UI relation widget#76

Draft
jarofgreen wants to merge 1 commit intomainfrom
2025-12-17-issue-70-relation-editor-remove
Draft

WIP add remove button to custom UI relation widget#76
jarofgreen wants to merge 1 commit intomainfrom
2025-12-17-issue-70-relation-editor-remove

Conversation

@jarofgreen
Copy link
Copy Markdown
Contributor

#70

@jarofgreen jarofgreen self-assigned this Dec 17, 2025
@jarofgreen jarofgreen marked this pull request as draft December 17, 2025 17:02
@jarofgreen jarofgreen changed the title WIP WIP add remove button to custom UI relation widget Dec 17, 2025
@jarofgreen
Copy link
Copy Markdown
Contributor Author

The problem was around QGIS actually deleting the item.

From the error message, I wonder if it's looking for a single id where as these relation tables have a composite primary key of 2 id's?

https://qgis.org/pyqgis/master/core/QgsVectorLayer.html#qgis.core.QgsVectorLayer.deleteFeatures I'm not sure if DeleteContext would help but I suspect not reading the docs?

Maybe we have to delete right in the SQLite DB then get QGIS to reload from the data source?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant