ungrouping rotated group with text-on-path transforms text twice

Bug #168286 reported by Nremmel
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Jabiertxof

Bug Description

steps to reproduce the bug:

1. create a path
2. attach text to the path
3. create another path
4. group everything
5. turn the group
6. ungroup everything

Bug: the text is turned to its original position and does not keep attached
to its path.

Changed in inkscape:
status: New → Confirmed
tags: added: groups
removed: ungroup
summary: - ungrouping rot group with text-on-path transforms text twice
+ ungrouping root group with text-on-path transforms text twice
Revision history for this message
su_v (suv-lp) wrote :

still reproduced with Inkscape 0.46+devel r22389.

Text is not returned to its original position though and still remains 'Text on Path' but the rotate transformation is applied again to the text (not the paths) when ungrouping.

summary: - ungrouping root group with text-on-path transforms text twice
+ ungrouping rotated group with text-on-path transforms text twice
Revision history for this message
Alvin Penner (apenner) wrote :

this bug is still present in 0.47pre4, and shows up on a translation of the object, as well.

Revision history for this message
Kjohrf (kjohrf) wrote :

Just hit this bug on a project, or something very similar. Ungrouping caused the text (which is on a path) to end up in a strange place.

Revision history for this message
KalleMP (kallemp) wrote :

Makes the names on rivers jump around kind of funny when rotating a map by 90 degrees. They are perfect while still in the group and when ungrouping they rotate a further 90 degrees.

Revision history for this message
Pablo Trabajos (pajarico) wrote :

Present in 0.48+devel r10141.

If I make several copies of a grouped object and ungroup all at once, only the original group has this problem. Anybody getting this?

Workaround: If I delete the transform attribute using XML editor, the text gets placed correctly.

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

This will be very tricky to fix. What happens currently is that the group transform is applied to both the text and its path, causing double rotation. The solution for this specific case would be to apply the transformation only to the path, but it is not a general one: it changes the appearance when the transformation does not preserve angles (e.g. it contains a non-uniform scale or a shear component), and furthermore this can't be compensated bychanging the font size. For the case of arbitrary transform, there are two ways to preserve the appearance:

Method 1
1. Apply group transform to both text and path
2. Create a clone of the path
3. Apply the inverse of group transform to the clone
4. Replace the textpath used by the text with the clone

Method 2
1. Move untransformed path to the defs
2. Replace the original path with its clone
3. Apply group transform to clone and text

I would be in favor of using method 2, but it does have the unfortunate problem of replacing the path with a clone that can no longer be edited in any obvious way. Improvements in the path editor might be able to overcome that, however.

Revision history for this message
Martin Owens (doctormo) wrote :

I wonder if a solution might be in changing the way text-on-path objects work. If we remove the ability for them to have any transforms , what is the cost to our capability vs. removing a rather annoying disassociation effect. Imagine transforming the text in some way but that transform being routed to the path instead. We'd solve a lot of issues with dragging, group, etc etc. (we may also be able to remove some existing readjustment code).

Thoughts?

Jabiertxof (jabiertxof)
Changed in inkscape:
assignee: nobody → Jabiertxof (jabiertxof)
Revision history for this message
Jabiertxof (jabiertxof) wrote :

This patch improve a lot the situation:
It not handle:
Skew or non uniform scale, fallback to text in size and position but without deformation
It handle:
Uniform scale
Rotate
Diferent text transforms as change kerning,sizes, text and word spacing...

Revision history for this message
Jabiertxof (jabiertxof) wrote :

This fixes comment and minor things.
I think in two days commit the patch if no objection
Thanks Mc- for your help!

jazzynico (jazzynico)
Changed in inkscape:
milestone: none → 0.92
status: Confirmed → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

Tested successfully on Windows XP (32-bit), Inkscape rev. 14998. The lost of the skew parameter is a regression, and thus should be documented in a follow-up report.

Revision history for this message
Jabiertxof (jabiertxof) wrote :

I open a new bug #1594565 for this. I could retain the non-conformal transform but in this case the text-on-path become bad position/rotation/scale, I think now is better than a unwanted position, rotation and scale for the text-on-path.

Revision history for this message
Jabiertxof (jabiertxof) wrote :

Fixed on r.15002

Changed in inkscape:
status: In Progress → Fix Committed
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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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