Pasting gradients across documents breaks

Bug #166245 reported by jimmac
4
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned

Bug Description

If you take a complex drawing with lots of objects with
gradients, select all, copy, create new document,
paste, all the gradients' have weird placement/offset.

The object should appear the same as the copied source.

Tags: linux other
Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

Should not happen. I tested a few files and cannot reproduce
that. You'll have to submit a sample file that demonstrates
this (please always attach samples when reporting bugs, it
helps a lot!).

One possibility is that you have the "transform gradients"
button on the controls bar off and do paste (Ctrl+V). This
button off means that all gradients stay unmoved relative to
the canvas, when the objects that use them move. Pasting, on
the other hand, consists of pasting into the original place
and then moving the pasted object under the cursor. With
"transform gradients" off, this move will indeed break
gradient placement. What you need to do is either switch
"transform gradients" on, or use Paste in place (Ctrl+Alt+V,
does not do any moving, just pasting it to the same place
where it was copied from) instead of simple Paste.

Revision history for this message
jimmac (jimmac) wrote :

ATM I cannot attach the artwork in question. But more info
on when this happens. It probably has to do with gradient
being referenced in multiple objects. To trigger this I:

1) Work on a large canvas (480x480pt). I work on an icon,
copy paste to new document at 48x48pt, tweak and
_paste_back_ . Then the gradients are referenced bu the two
icons.

I can of course mail the document to you privately.

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

Ah, pasting _back_ explains it. This in all probability is a
dupe of

https://sourceforge.net/tracker/index.php?func=detail&aid=1024331&group_id=93438&atid=604306

Since the changed gradient still uses the same ID, on
pasting back it reverts to the old version which you had in
the old document. So, if you really need to copy/paste back
and forth, a workaround is to use XML editor to change the
id of the gradient and the reference to it from the object
style before copying. Yeah, it's very inconvenient, but it
should work.

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.