Hi

On Thu, Dec 18, 2014 at 9:50 PM, Germán Carrillo <[email protected]>
wrote:
>
> Thank you Luigi.
>
> So, I guess the following code would be enough to make the example given
> in [1] much more generic:
>
> #######
> cloned_group1 = node_group1.clone()
> root.insertChildNode(0, cloned_group1)
>
> parent = node_group1.parent()                   # new code
>
> parent.removeChildNode(node_group1)     # replace root by parent
> #######
>

 Luigi is right - you need to call removeChildNode() on the parent node.
When I will find some time I will add a note to the example.

Cheers
Martin
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to