Hi Fernando,

   I don't know if I've ever seen this happen before.  What
version of Batik are you using? Also you show the code for
removal, the code you are using for adding might help although
I'm not sure how you could accidentally clone and add the
element a second time.

   A reproduceable test case is of course the best way to
identify the problem (if there is one).

Fernando Mendez wrote:

Dear Mr. De Weese,
I am currently working on a SVG Editor project, and I have found some
problems concerning how to properly manipulate the SVGDocument. I have
read so far all the documentation I have been able to find; however I do
still have some doubts and I fear I am doing something wrong.
All the operations are done through the UpdateManager, with a code like
this:

       void effacerElement(Node element) {
           Vector suppression = new Vector(2);
           suppression.add(new Integer(SUPPRESSION));
           suppression.add(element.getParentNode()); // Parent
           suppression.add(element); // Element a effacer
           subactions.add(suppression);
           um.getUpdateRunnableQueue().invokeLater(new
ActionSuppression(element));
       }
....
       class ActionSuppression implements Runnable {
           private Node element;
           ActionSuppression(Node element) {
               this.element=element;
           }
           public void run() {
               element.getParentNode().removeChild(element);
           }
       }
...

This seems to work to delete elements, but I have discovered that a
bizarre situation arrives when I delete and readd an element, as might
happen when undoing/redoing a creation operation. The SVGDocument is
correct, (as when we save it to a file and reopen it we find the
expected structure); however,  after removing an element and readding
it, the JSVGCanvas doesn't display it properly: it is drawn twice, but
it's only once in the document. This can be seen with objects with
certain transparency. I am sure I am doing something wrong , but I can't
figure out what it could be.
Could you please indicate me in which situations has this behavior been
observed before?

Thanks for your time and attention,
Fernando Mendez.
Ecole Nationale Superieure des Telecommunications.
Paris.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to