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
"On map identification" option of relation reference widget not working properly #22762
Comments
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Simon South (@simonsouth) This problem still occurs when trying to add related features (through a many-to-many relation) via the attribute table. It happens because the "Add Feature" dialog is "shown by calling its @exec()@ method": QGIS/src/app/qgsfeatureaction.cpp Line 251 in 1192f94
For the courageous, a simple workaround is to apply a similar fix by changing "line 40 of qgsguivectorlayertools.cpp": QGIS/src/app/qgsguivectorlayertools.cpp Line 40 in 1192f94
to
which effectively makes the dialog non-modal and allows the feature-identification tool to function normally. This isn't really a solution, though:
I think a "proper" fix would involve refactoring the "Add Feature" dialog's logic, currently spread across "QgsFeatureAction::addFeature()": QGIS/src/app/qgsfeatureaction.cpp Lines 168 to 256 in 1192f94
QGIS/src/app/qgsfeatureaction.cpp Lines 52 to 101 in 1192f94
|
Author Name: Giovanni Manghi (@gioman) It seems you could provide a patch via a pull request on github? Simon South wrote:
|
Author Name: Simon South (@simonsouth) Giovanni Manghi wrote:
Sure, but I don't consider the workaround I posted to be a suitable fix. The code needs to be refactored and this could be a significant undertaking, considering the "Add Feature" dialog is used in multiple places. Does the idea of pulling out the UI-related portions of @QgsFeatureAction@ into a separate @QDialog@ subclass sound reasonable to you? If I could demonstrate this working, is it something the QGIS team might accept? |
Author Name: Giovanni Manghi (@gioman) Simon South wrote:
your suggestion are valuable, but to make them gain traction you should make a pull request or eventually comment the existing code, but things better done on github. Thanks! |
Author Name: Giovanni Manghi (@gioman) End of life notice: QGIS 2.18 LTR Source:
|
Author Name: zicke - (zicke -)
Original Redmine Issue: 14805
Affected QGIS version: master
Redmine category:relations
Assignee: Matthias Kuhn
The "On map identification" option does not work if "Add feature" dialog is open. The identification works if you first add the (geometryless) feature and close the dialog (saving feature is not needed) and then identify the geometry.
The text was updated successfully, but these errors were encountered: