Bug report #10865
Regression: FeatureForm inactive for new feature when opened from Python
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | Matthias Kuhn | ||
Category: | Forms | ||
Affected QGIS version: | 2.4.0 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 19233 |
Description
The featureForm opened via iface.openFeatureForm(layer, feature) is inactive for new features, Regression from 2.2
To reproduce: Make any vector layer active and editable, then in Python console:
layer = iface.activeLayer()
feature = QgsFeature()
feature.initAttributes(layer.pendingFields().count())
iface.openFeatureForm(layer, feature)
=> form is all inactive
Associated revisions
enable feature form on openFeatureForm on editable layer (fixes #10865)
enable feature form on openFeatureForm on editable layer (fixes #10865)
History
#1 Updated by Giovanni Manghi over 10 years ago
- Priority changed from High to Severe/Regression
#2 Updated by Matthias Kuhn over 10 years ago
Not sure what's wrong and I'm lacking the time right now to look into it.
For the moment, please use the following method.
iface.vectorLayerTools().addFeature( layer )
It's a nicer option anyway as it allows you to specify default attributes and geometry.
#3 Updated by Jürgen Fischer over 10 years ago
- Status changed from Open to Closed
Fixed in changeset 11f197ee5bd3792f333cd9c5b8b8de19e0e07fab.
#4 Updated by Bernhard Ströbl over 10 years ago
Matthias Kuhn wrote:
Not sure what's wrong and I'm lacking the time right now to look into it.
For the moment, please use the following method.
[...]
It's a nicer option anyway as it allows you to specify default attributes and geometry.
I wasn't aware of this option. It's new in QGIS 2.2, so I would have to raise the minimum version of my plugin, will give it a try.
#5 Updated by Bernhard Ströbl over 10 years ago
Jürgen Fischer wrote:
Fixed in changeset 11f197ee5bd3792f333cd9c5b8b8de19e0e07fab.
Hi Jürgen,
fix works, thank you. Will this be backported to the bugfix release of 2.4?
#6 Updated by Jürgen Fischer over 10 years ago
- Status changed from Closed to Reopened
- Assignee set to Matthias Kuhn
#7 Updated by Jürgen Fischer over 10 years ago
- Status changed from Reopened to Closed
sorry for the noise