On Thursday, October 11, 2007, 3:33:30 AM, Michael wrote:
MW> I had an SVG file where some of the colour were defined using CSS MW> as a top-level style tag. When they were opened in Inkscape they MW> displayed fine, but those colour came out wrong when copied to a MW> new file since I guess the CSS values were not copied across.
Or because the styles are mixed together.
I suspect the two balloon cliparts are the same structure with different styling. (This is another area where presentation attributes give you a benefit, since that mixing will not hapen).
MW> I was able to paste it to the other file with correct colours by: MW> 1) Open the file in Inkscape MW> 2) Select the relevant objects and copy MW> 3) Paste them within the same document MW> 4) Copy the newly pasted selection MW> 5) Paste that into the new document
MW> These steps don't work with you balloon example. Your problem MW> looks similar but with gradients instead of CSS,
Gradients us a styling property, in SVG. So its quite likely to be the same thing. Or conflicting ids (two gradients, with different colors, with the same id).
MW> probably because MW> the gradients are named the same in different coloured balloon MW> images, so the pasted blue balloon just references the red MW> balloons gradients in the pasted version since they are named the same.
Yes I think thats the case here. In which case it can be fixed up in a text editor using search and replace.
MW> I'm not sure if this should be considered a bug or not (multiple MW> pasted balloons use the same gradients). MW> CC'ing to the developers list to see what people think about MW> this, and whether there is any kind of hidden option to get the behaviour you want.
Not detecting duplicate ids could be considered a bug. Of course by the time the second balloon is pasted in, its too late to disambiguate the references. However, detecting a potential id conflict between the current document and the copy/paste buffer when paste is selected (and warning, offering to fix up the conflicts before pasting) would be a nice feature.