Importing multiple SVGs mixes up colors (XML ID clash?)

Bug #168626 reported by Domq
48
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
sas

Bug Description

The attached tarball contains two .svg files (taken from the KDE artwork)
that cannot seem to co-exist in the same drawing in inkscape. Starting from
an empty drawing, importing emblem_network.svg before hard_system_user.svg
causes the latter to go technicolor, and vice versa.

I noticed there is a gradient named "aigrd8" in both files. Looks like the
namespaces of XML IDs in both files clash with each other somehow.

This bug also exists in the latest nightly build.

Revision history for this message
Domq (domq) wrote :
Revision history for this message
nightrow (jb-benoit) wrote :

I confirm that this happen with the 08/01/08 svn build and inkscape 0.45.1

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Tom Davidson (tjd-mit) wrote :

bug 192949 seems to refer to a similar problem: the 2nd imported SVG has problems...

Revision history for this message
ScislaC (scislac) wrote :

Is this an issue with gradients only or with single colors? If so, this is a dupe of a rather old bug.

Revision history for this message
sas (sas-sas) wrote :

Assigning to myself. I have ID clash resolution on import working now, and will post a patch once I've tidied it up and tested it a bit more.

Changed in inkscape:
assignee: nobody → sas-sas
Revision history for this message
sas (sas-sas) wrote :

Here's the patch.

Changed in inkscape:
status: Confirmed → In Progress
Revision history for this message
sas (sas-sas) wrote :
Revision history for this message
sas (sas-sas) wrote :

Added to SVN (revision 18906).

Changed in inkscape:
status: In Progress → Fix Released
Revision history for this message
bbyak (buliabyak) wrote : Re: [Bug 168626] Re: Importing multiple SVGs mixes up colors (XML ID clash?)

Hey sas,

thanks a ton for this patch! It works as expected for importing, but
can you also fix the same problem for pasting? For example: draw a
gradient, copy object with that gradient, change one color in the
gradient, paste. Expected result: old gradient pasted; actual result:
new changed gradient is pasted.

Revision history for this message
sas (sas-sas) wrote :

I'll have a look at fixing the pasting problem (bug 165936).

Revision history for this message
Dominique Quatravaux (dominique-quatravaux) wrote :

I confirm it's fixed in SVN 19792 (ie before release 0.47). Thanks a bunch!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.