Operation on multiple cloned object gives odd results

Bug #802053 reported by larienna
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Medium
Unassigned

Bug Description

[Tested on windows XP, version 0.48]

It happens in many different situations than the one I am going to explain, but I think the common relation is that I am applying a command on multiple cloned objects at once. I included the screen shots of before and after the operation and included the original .svg file in attachment.

I have many hexes which has been grouped and clipped. One type of hex type is smaller and has been made with clones. It is possible that they are not nicely cloned, which means that each clone does not necessarily have the same parent. Some can have another clone has a parent.

Now I want to place these hexes on a separate layer. If I use CTRL-click to select one of the small hex within the group and call function "Move selection to the layer above" it works perfectly. If I select multiple hexes and perform the same function, it moves the hexes to the layer above, but spread them into random directions.

I imagine they are comparing something with the original clone position rather than only affecting themselves. Why can't they just switch layer without moving.

Thank You

Revision history for this message
larienna (ericp-ariel) wrote :
su_v (suv-lp)
tags: added: clones groups transformations
Revision history for this message
su_v (suv-lp) wrote :

> If I use CTRL-click to select one of the small hex
> within the group and call function "Move selection
> to the layer above" it works perfectly.

Could you point out for which single clone this works for you in the attached drawing? AFAIU the underlying issue, it is not related to the number of clones in the selection, but whether the parent group/layer of the clone/original and the target group/layer have different 'transform' attributes applied.

Related/same underlying issue:
Bug #168651 “"Tiled Clones" inside transformed groups broken”
Bug #479638 “file gets mangled due to Object->UnGroup”
Bug #659452 “Ungrouping objects causes translation in clones”

Main issue: as quoted in comment #7 of bug #479638, clones do not handle transforms of parent groups (or layers) well. When moving a clone onto a another layer (with a different or no transformation applied) or when ungrouping the parent group which has a transformation applied, the affected clones (moved or ungrouped) can get displaced incorrectly.

Notes:
- To avoid random nested clones: create one clone of the original (Alt+D), then duplicate the clone (Ctrl+D) instead of cloning it again.
- The 'transform' attribute of parent layers gets added to existing, not-empty layers when changing the page size or orientation. This can cause unexpected displacements when working with clones (see e.g. bug #168651 and its many duplicate reports). The same can happen when working with clones inside a group, and moving or scaling the group.

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

Attaching a fixed version with the small hexes moved to the layer 'Small Hex' above, without incorrect displacement.

2 Steps to move the clones out of the group and up to a new layer:

1) for each of the two clipped groups in layer 'Hexes':
   - enter the group with 'Ctrl+Enter'
   - select all small hexes (original and clones)
   - use 'Shift+PageUp' to move the selection out of the clipped group
     (they still are in layer 'Hexes', just outside (above) the group)
   - leave the group with 'Ctrl-Backspace'

2) after having moved the (nested and cross-linked) clones and originals out of each clipped group (still on layer 'Hexes'):
   - select all 20 objects (original, clones and clones of clones of ...)
   - group them with 'Ctrl+G'
   - move the group to the layer above with 'Shift+PageUp'
   - ungroup the moved group on layer 'Small Hex' with 'Ctrl+U'

done.

Revision history for this message
su_v (suv-lp) wrote :

Both the problem and the workaround (comment #3) tested with Inkscape 0.48.1 and 0.48+devel r10365 on Mac OS X 10.5.8 (i386)

Revision history for this message
larienna (ericp-ariel) wrote :

> Could you point out for which single clone this works for you in the attached drawing?

I think it was the original object. I tried on other hex, and most of the time, moving 1 hex on another layer translate another hex.

> To avoid random nested clones: create one clone of the original (Alt+D), then duplicate the clone (Ctrl+D) instead of cloning it again.

I did not even know that I could do this. This would solve many problems.

I was thinking, Is there are interest in cloning a clone? Else why can't cloning a clone automatically link to the original parent by default. This would solve many problems. Or you could have a parameter that call allow user to optionally allow clones of clones.

> 2 Steps to move the clones out of the group and up to a new layer:

Thanks for the procedure. So it's basically, pull them out of the group and move them as a group to the next layer.

Revision history for this message
Mc (mc...) wrote :

cant reproduce once applied the fix in comment #4 of
https://bugs.launchpad.net/inkscape/+bug/1245339

(this bug is probably a duplicate)

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.