[Qgis-developer] crash with undo command
Nejia
nejia at spaceyes.fr
Thu Sep 25 02:02:53 PDT 2014
How to verify if the signal « feature added » is emitted from an add feature
tool?
De : qgis-developer-bounces at lists.osgeo.org
[mailto:qgis-developer-bounces at lists.osgeo.org] De la part de Nejia
Envoyé : mercredi 24 septembre 2014 16:09
À : qgis-developer at lists.osgeo.org
Objet : [Qgis-developer] crash with undo command
Hi,
I have a plugin that allows to change an attribute value of added feature to
the selected value of a combo-box.
I change the attribute when the signal featureAdded is emmited (ie. Before
the endEditCommand of add feature is called) so in this undo command we
have in the order:
1- QgsVectorLayerUndoCommandAddFeature
2- QgsVectorLayerUndoCommandChangeAttribute
If we undo add feature command it must call undo() on all child commands
in reverse order, but when I debug in QGIS it do it in the order not in
reverse order ie. It call:
1- QgsVectorLayerUndoCommandAddFeature::undo()
2- QgsVectorLayerUndoCommandChangeAttribute::undo()
Thats why Qgis crash when I undo add feature command
An explanation for this?
Is there any way to knew if the signal feature added is emitted when a new
feature is added not from commitChanges(), redoEditCommand() and
undoEditCommand()?
Thank you
Nejia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140925/d689ec63/attachment.html>
More information about the Qgis-developer
mailing list