Inkscape: A Vector Drawing Tool

file gets mangled due to Object->UnGroup

Reported by Alvin Penner on 2009-11-09
46
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Unassigned

Bug Description

- this is based on a .svg file from Bug 474963, but it is a separate bug.
- load the file binary_tree.svg
- perform Edit->Select All
- perform Object->UnGroup
- save the file as binary_tree_mangled

Alvin Penner (apenner) wrote :
Alvin Penner (apenner) wrote :
Alvin Penner (apenner) wrote :

What has happened is that all of the circles except one (the one around 'G') have been translated by the same amount.

The circles that have been moved appear to be clones. They all contain a reference to xlink:href #path3873, where path3873 is the circle around 'G'.

~suv (suv-lp) wrote :

The bug is triggered by un-grouping the group that contains the original circle (grouped with the character 'G').
a) individually un-grouping the groups containing a clone doesn't result in unexpected transformations.
b) manually removing the 'translate' attribute of the group containing the original circle and the character 'G' in the XML Editor before un-grouping all shows the revers happening: the circle and 'G' are translated by the same amount in the opposite direction as the clones are moved in you attached example 'binary_tree_mangled.svg' whereas the un-grouped clones stay in place.

possibly related or similar issues reported:
 bug #168651 "Tiled Clones" inside transformed groups broken
 bug #168286 ungrouping rotated group with text-on-path transforms text twice

tags: added: trasnformations
~suv (suv-lp) wrote :

reproduced with Inkscape 0.46+devel r22566 on OS X 10.5.8

possibly the other reports originating from the same SVG octree file share a common cause (nested 'translate' attributes of grouped clones, maybe aggravated by 'resize page to selection' which adds an additional translate attribute to the parent group "Layer 1"):
Bug #474963 “Can't export to WMF (UniConvertor failed)”
Bug #479553 “Moving shape with connectors, connectors go wild”
Bug #479577 “Cannot move (drag) an object”

Changed in inkscape:
status: New → Confirmed
jazzynico (jazzynico) wrote :

Also reproduced on Ubuntu 9.10, pre4, and Windows XP, 0.46 and pre4.

Changed in inkscape:
importance: Undecided → Medium
tags: added: groups
~suv (suv-lp) on 2009-11-10
tags: added: transformations
removed: trasnformations
~suv (suv-lp) wrote :

Two references to what seems to be a known problem:

A) detailed earlier comment by Pjrm in bug #168651 about page resize:
<quote>
A second question is how Fit canvas to selection should implement its
translation step, whether adding a transform attribute to the group as it
does now or whether to go more deeply. If the latter, then how deeply? If
fully deeply, then beware of issues with objects in a group being cloned
(especially if that group has a rotation transformation): need to be
careful about how to adjust the clone's transform.
</quote>
<https://bugs.launchpad.net/inkscape/+bug/168651/comments/1>

B) related posting in inkscape-devel:
From: bulia byak
Subject: "clone behaviour"
Date: 2009-07-03
<quote>
> -transform management: create an object A, create a clone A' of it, put A'
> in a group G. Now select A and G and rotate them. A' is rotated twice!!!

I have spent quite a time coding around issues like this and ensuring
that clones transform intuitively, using compensations. However my
calculations are limited to the simple case of naked clones. If you
put a clone in a group and transform the group, or use clone of clone
chains, this will still behave wrong. But it's not some unfixable
problem. The code for compensations is there, we just need to make
this code smarter and make it look farther around the clone to figure
out the correct compensating transformation. Maybe it was just me, but
I found this too difficult, so I limited myself to the simple case -
someone more mathematically gifted can probably crack it easily. Give
it a try.
</quote>
<http://article.gmane.org/gmane.comp.graphics.inkscape.devel/30630>

I haven't yet found an earlier report of this issue (besides the possibly related one about the clone-tiler) but since it has been unsolved for some time I expect there must be other reports describing unexpected behavior of clones or their original objects in transformed groups. Anyone?

Alvin Penner (apenner) wrote :

- something has changed in the rendering of the file binary_tree.svg. The last 'normal' rendering I have is from 0.47 rev 22583, Nov 22, 2009.
- screen dump attached :

Alvin Penner (apenner) wrote :

the first bad rendering is from bzr rev 9111, Feb 25, 2010, which is what it currently looks like:

~suv (suv-lp) wrote :

@Alvin - could be the same regression as reported in bug #556467 “connectors between groups misplaced (regression)”
<https://bugs.launchpad.net/inkscape/+bug/556467> (and also noted in <https://bugs.launchpad.net/inkscape/+bug/552289/comments/4>).

Alvin Penner (apenner) wrote :

wow, I am truly impressed by your powers of recollection. The only reason I looked at this was because I vaguely remembered being the author of the bug, long ago.

- fwiw, the original bug still apears to be present as well, the Object Ungroup operation will produce further mangling in addition to the errors in the original rendering.

~suv (suv-lp) on 2010-10-02
tags: added: clones
~suv (suv-lp) wrote :

Related (likely duplicate) reports:
Bug #653574 “Ungrouping moves clones inside nested groups”
Bug #659452 “Ungrouping objects causes translation in clones”

insaner (insaner) wrote :

related bug:
    Bug #1195043 - "move selection to layer above" spreads clones up Edit

does anyone know roughly where in the code this bug is located? i might be able to give it a quick gander and see what could potentially be done.

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

Other bug subscribers