duplicate layer with clone doesn't clone original

Bug #267565 reported by pygmee
2
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Wishlist
Mc

Bug Description

imagine you have clones + original on one layer.
Then duplicate this layer. Clones copies are defined as clones of the true original, great.
But the copy of the original is not a clone, neither an original itself.

 I guess, it should be defined as a lone.

Tags: clones layers
Revision history for this message
pygmee (pygmee) wrote :
Revision history for this message
pygmee (pygmee) wrote :

i guess a menu like : make this object a clone of... would be nice to.

Revision history for this message
prkos (prkos) wrote :

They way duplicating layer with clones works is as expected. This is the usual way copying works, it's not affected by layers.

When you copy a clone, it keeps the same original as the object it is a copy of.
When you copy an object that is not a clone, it doesn't suddenly become a clone.

In the development builds there is a new feature Relink to copied. You can copy an object, select some clones and use that option.
In Inkscape preferences under Clones there is an option: When duplicating original+clones: Relink duplicated clones. When this option is ticked you get a new identical set of original and its clones. The copy of the original will become a new original, and the copied clones will be clones of the new original.

Are you actually requesting a feature that would turn a copy of an object that has clones into one of its clones?

Revision history for this message
prkos (prkos) wrote :

lol I didn't see your last comment

Can you give an example where this would be useful? Can't you just make another clone of the original?

Revision history for this message
pygmee (pygmee) wrote :

Ok for the relink fonctionnality. Imagine now, you're working on a road map or weather forecast map, or anything you can imagine that needs lots of clones with lots of original. For example UK map with all the kinds of symbols that need to be put on a map.
We want to change the symbol, for example, because we don't want it to be precise but nice, for a tourist brochure for example.
What i would do is duplicating the map layer (get for openStreetmap for example), and draw my new symbols. With the actual possibilities, i would have to select the clones i need and relink.
What would be nicer is just relink, on the new layer, the copy of the first original. So that in Inkscape i'd have
Layer 1 : original A + ClonesAA AB AC
layer 2 : Clone A'=Original B + Clones BA BB BC
so that if i change clone A' just the other clones of this layer are changed.
The difficulty i can see in this is that a clone can itself be an original, but inkscape can already do this. This would just have to be set for the duplicating layer command.

Plus the actual behavior of the duplicate layer command is not consistent with the copy-pasting of a original+clone selection. In this case, the copy of the original is set as an independant original, but copied clones are not linked to the first original but to the new one.

I hope i can make myself understandable. tell me if not.

jazzynico (jazzynico)
Changed in inkscape:
importance: Undecided → Wishlist
status: New → Confirmed
tags: added: clipboard layers
Revision history for this message
su_v (suv-lp) wrote :

Tested with Inkscape 0.48.4 and 0.48+devel r12195:

1) 'Edit > Copy', 'Edit > Paste':
   always relinks pasted copies of clones to pasted copy of original
2) 'Edit > Duplicate':
   behavior depends on preference setting (introduced in r6570)
3) 'Layer > Duplicate current layer':
   does not respect the preference setting for 'Duplicate'
   (never relinks duplicated clones to duplicated originals)

pygmee wrote on 2008-09-09:
> Plus the actual behavior of the duplicate layer command is not
> consistent with the copy-pasting of a original+clone selection.

It is not supposed to be consistent with 'Copy & Paste', it should be consistent with 'Edit > Duplicate' though:
- Copy&Paste always relinks (since 0.47), if both original and clones are part of the copied objects, and uses the system clipboard (export to temporary file, and import that temporary file again).
- Duplicate (selection, current layer) OTOH duplicates XML nodes, and does not involve the system clipboard at all.

Related current code:
SP_VERB_LAYER_DUPLICATE
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/12195/src/verbs.cpp#L1262>
sp_selection_duplicate
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/12195/src/selection-chemistry.cpp#L390>

Related earlier revisions:
5927: Added duplicate layer command. Fixes bug #171246.
 <http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/5927#src/verbs.cpp>
5948: new command: relink clone to copied object
 <http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/5948>
6570: optionally (default off) relink duplicated clones to the duplicated original
 <http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/6570>
7464: Edit > Duplicate Layer should duplicate hidden items, locked items, sublayers, everything
 <http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/7464#src/verbs.cpp>

AFAIU the changes from revision 7464 (to fix bug #267564) dropped support for the clones preferences setting when duplicating the current layer (which would have been respected with the older version, using 'sp_selection_duplicate' to duplicate the layer content, and then moving that duplicated content to a new layer)

Based on the current state in stable (0.48.4) and trunk (r12195), I'm proposing to change the report from feature request to actual bug:
'Duplicate current layer' should respect the preferences setting for clones whether to relink to duplicated original or not (current default: off).

@JazzyNico - would you agree with above proposal (and with tagging this with 'easy-fix' - it could be a suitable task for the 'two patches' rule (GSoC))?

Changed in inkscape:
status: Confirmed → Incomplete
su_v (suv-lp)
Changed in inkscape:
status: Incomplete → Triaged
tags: removed: clipboard
Revision history for this message
Mc (mc...) wrote :

fix committed in 14134

Changed in inkscape:
assignee: nobody → Mc (mc...)
status: Triaged → Fix Committed
su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.92
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
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.