Hi Антон, On Mon, May 20, 2013 at 08:56:05PM +0400, Антон Борисов wrote: > Hello, need some help with draw extension > > I have 3 shapes connected: 2 connector shapes, 1 text shape, they are > connected next way: " ----> text ----> " > > I trying to do next: removing one of this shapes (i.e by key delete) > will causes deleting two another. > > I handle XEventListener "ShapeRemoved", and deleting another by > XDrawPage.remove, but sdraw fails in some case, exactly when firstly i > remove text shape ( by key ).
In which way is it failing? AFAIK, there is no way to know, from the text shape, if it connected to connectors. For a connector, you have StartShape and EndShape; but for the text shape you have no way to know which connectors are connecting it. One way is to track this information in a collection of connected shapes and for each connected shape store the information about its connectors. Then, when you get notified that a shape is being removed, search the shape in the collection and remove its connector. Regards -- Ariel Constenla-Haile La Plata, Argentina
pgpKRjXZuGwt6.pgp
Description: PGP signature