-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Document management system a.k.a. polymorphic relations GUI #41009
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some minor changes.
Great job!!!
Unrelated test failures |
Looks like the "needs-documentation" bot is also broken. This PR did not create the expected issue report. |
I will do this and qgis/QGIS-Documentation#6435 in one go. |
No worries @suricactus. My comment was more an issue report than a doc request. |
@suricactus Playing with cppcheck, I stumble upon this. It looks like a possible issue right here, no? |
…lidation As pointed in qgis#41009 (comment) there was an early return that was probably a leftover from local tests and somehow passed the review. To facilitate proper validation, a new event had to be added on the `referencingField` combo, which triggers the form validation and enabling the ok button respectively. Thank you @troopa81 for bringing my attention.
Adds GUI to manage polymorphic relations, last followup of my previous two PRs related to implementing qgis/QGIS-Enhancement-Proposals#79 , see #40721 and #40914 .
The "Add relation" button in the relation manager screen now has additional option to add/edit polymorphic relations:
![image](https://user-images.githubusercontent.com/2820439/104571876-551ee480-565c-11eb-8b3a-2cf38f588ff1.png)
The "Add polymorphic relation" and "Edit polymorphic relation" open the same dialog, in the latter case with predefined values:
![image](https://user-images.githubusercontent.com/2820439/104571564-eb063f80-565b-11eb-8189-9beae3de587b.png)
The "Add relation" dialog has been updated, now it uses the same table with buttons on the right layout as most of the QGIS UI. Other than UI, there are no other changes here.
![image](https://user-images.githubusercontent.com/2820439/104571757-26a10980-565c-11eb-9220-312bdb7f1e55.png)
Once saved, the list of relations appear as a tree widget, where the generated normal relations for a polymorphic relation appear as children. The names of the generated relations cannot be changed.
![image](https://user-images.githubusercontent.com/2820439/104571664-07a27780-565c-11eb-8c7a-3ab2ed045218.png)
When saving the
.qml
style of the layer, the generated relations are not stored, since they are generated from their polymorphic relation every time the project is opened. The polymorphic relations are not exported either, at least for now.