-
-
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
QgsAttributeForm not entering edit mode #19678
Comments
Author Name: Matthias Kuhn (@m-kuhn) In your screenshot you did not select a feature. We could think about pre-selecting the first feature to make it more intuitive. I recently discussed with Alexandre about this (or a similar issue) and realized, that we were talking about two different things.
|
Author Name: Andrew McClure (Andrew McClure) There are a number of use cases.
|
Author Name: Matthias Kuhn (@m-kuhn) Is there something wrong with the first two scenarios? These were working nicely last time I looked. Related to python code, there was a problem when directly using QgsAttributeDialog and toggling edit mode after opening the dialog. This has been solved in a3dad24. openFeatureForm should have always worked. Can you clarify what you are trying to do, what is not working, point to some sample code (exact locations, not a whole plugin. Most appreciated would be a minimal working example that can be run from the python console). It could also be related to the provider you use or if a subset string is set on your layer. |
Author Name: Andrew McClure (Andrew McClure) Hi Matthias I would certainly love this to be a problem with my own code! Unfortunately, for you to view the flow/recreate it is not as trivial as running a few lines of code. However, I can point to the places in my code. And there is also the feature form available from the AttributeTable if you simply run the plugin TelemetryLayer and follow the steps to create a new Telemetry Layer. As for what is not working/what we are trying to do, this should be clear from my last issue update. I simply want the edit mode of the layer to be respected with regards opening a custom feature form. As to the code, here are the critical bits:
https://github.com/nzfarmer1/telemetrylayer/blob/master/topicmanagers/editformfactory.py
https://github.com/nzfarmer1/telemetrylayer/blob/master/tltopicmanager.py : Line 107 class tlSysFeatureDialog(tlFeatureDialog):
https://github.com/nzfarmer1/telemetrylayer/blob/master/tlbrokerconfig.py : Line 177+ |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman) End of life notice: QGIS 2.18 LTR Source:
|
Author Name: Andrew McClure (Andrew McClure)
Original Redmine Issue: 11395
Affected QGIS version: 2.4.0
Redmine category:attribute_table
Assignee: Matthias Kuhn
Use case:
Pre conditions:
A valid UI file and Init function have been specified via layer.setEditForm and layer.setEditFormInit
Steps:
Form opens but is not editable
Alternative flow 1.
Form is still not in edit mode
Alternative flow 2.
Finally, to force the form to open as editable it is necessary to programmatically start editing then directly call openFeatureForm:
@ layer.startEditing()
iface.openFeatureForm(layer, feature, True)
@
Example available using this plugin:
http://plugins.qgis.org/plugins/TelemetryLayer/
The text was updated successfully, but these errors were encountered: