
On Sun, 2013-10-06 at 19:18 +0200, Krzysztof KosiĆski wrote:
2013/10/6 Tavmjong Bah <tavmjong@...8...>:
- The XML dialog does not update the element type. The actual XML tree
is changed. I don't know how to signal the XML dialog to reload the XML tree (switching between two different desktops does result in an update). It seems I need an _observer.notifyElementChanged signal but how to actually do this is hurting my grey cells. Any hints would be appreciated.
It might be necessary to introduce a new callback to XML observers. To be honest, the XML tree was never designed to handle this case - that's why the method has "unsafe" in its name.
It seems we would need 7 callbacks in total:
- notifyAttributeChanged
- notifyChildAdded
- notifyChildRemoved
- notifyChildOrderChanged
- notifyContentChanged
- notifyElementNameChanged
- notifyElementRemoved
The notifyElementRemoved callback is necessary to fix this bug: https://bugs.launchpad.net/inkscape/+bug/540591
These changes are going to be invasive, and I think it's best to batch them together with the work on a partially typed XML tree and the SAX parser.
Thanks for the answer
As a temporary work-around I can do what is done when an object is converted to a path... create a new object.
Tav