In Advanced Tutorial, undoing a move of a "linked offset" unlinks it

Bug #166730 reported by Popolon2
2
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
jazzynico

Bug Description

launch inkscape
go to tutorial advanced , inset and outset section

try with exemple of two shapes (one black stroke and
one black fill) linked to red path.

move (black stroke, no fill) outline
undo with ctrl+z

move a node on the red path, the linked offset doesn't
follow.

In some order of operation case, I see than one or the
two "linked offset" are destroyed, but I don't find a
reproductible way for now.

Also changing linked offset size by keyboard,
ctrl+'('or')', instead of special node, transform it to
path, it's the normal behavior fot this keys, but could
be better to do in another way in this case???

Tags: undo tutorials

Related branches

Revision history for this message
Popolon2 (popolon2) wrote :

On reproductible mean to destroy 'linked offset' object by bug:

In the same tutorial: (after launching inkscape)
*change the stroke size of the red object (the source of the
links)
* move the red object
the two 'linked offset' objects are destroyed.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
ScislaC (scislac) wrote : Re: undoing a "linked offset" move unlinks it

In current SVN if I create a path and do a linked offset, it does not have this issue. It appears to be a problem with the tutorial file.

Changed in inkscape:
importance: Low → Medium
Revision history for this message
su_v (suv-lp) wrote :

still confirmed with 'tutorial-advanced.svg' of revision 22271:

1) move linked offset (black stroke, no fill), crtl-z, node edit inner path (red stroke, no fill) -> black linked offset no longer linked
2) 'destroyed' linked offsets: they are not destroyed but displaced (use 'zoom all' and (shift) <tab> to locate them ;-)

tags: added: tutorials
Revision history for this message
jazzynico (jazzynico) wrote :

Offset paths have these attributes set:
xlink:href="#advanced-f11-fr.svgpath1987"
inkscape:href="#path1987"

But path1987 doesn't exists elsewhere in the document.

If you use the same value for both attributes (xlink:href="#advanced-f11-fr.svgpath1987",
inkscape:href="#advanced-f11-fr.svgpath1987"), moving a linked offset doesn't break the link anymore.

More tests later on my dev computer.

Revision history for this message
jazzynico (jazzynico) wrote :

Made some changes in the xsl file so that it gives inkscape:href the same value as xlink:href.
It corrects the undo bug, but not the displace one (which is not xslt related, I think)...
Partial fix committed in revision 22358.

Changed in inkscape:
assignee: nobody → JazzyNico (jazzynico)
milestone: none → 0.47.1
status: Confirmed → In Progress
Revision history for this message
su_v (suv-lp) wrote :

Thank you for all your efforts to fix the tutorials! Will confirm after my next svn update ;-)

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

…or rather after the tutorials have been rebuilt.

Revision history for this message
jazzynico (jazzynico) wrote :

Tutorials rebuilt (and SVG committed) in revision 22362.

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

> It corrects the undo bug
Confirmed with Inkscape r22362 on OS X 10.5.8
> but not the displace one (which is not xslt related, I think)...
bug or the transform attributes of the linked offsets are off? If I select the three objects (original and 2 offsets), copy them and 'paste in place' in a new document - their position relative to each other has changed. Don't know if this helps though…

jazzynico (jazzynico)
tags: added: undo
Changed in inkscape:
milestone: 0.47.1 → 0.48
Revision history for this message
jazzynico (jazzynico) wrote :

Still investigating this old bug...

Another finding: when the original shape moves, the path and transform attributes are merged and the moved shape no longer have a transform attribute. Thus, if the offset position is calculated on the base of the original path...
And the original path uses absolute points (M115.81,73.567c...) which are changed into relative points (m 121.20293,3337.1639 c) when moved. Maybe something changed in the way Inkscape handles the path points (but I'm too new to tell...).
I'm going to change the original SVG subfile (which contains the 3 shapes only) in order to use relative path directly.

Revision history for this message
jazzynico (jazzynico) wrote :

I can reproduce the bug outside the tutorial:
1. Create a new document.
2. Draw a shape.
3. Add a linked offset.
4. With the XML editor, add a transform attribute with translate(100,100) as value to the shape and the offset.
5. Move the original shape.

The new path is now merged with the transform attribute, but the offset uses the new path as its base path, and still adds the transfom values.

Inkscape prevents this bug from happening when the shape is created with its UI by merging the original path and the translate value before creating the offset (and thus no transformation is added to the offset). But when the SVG is created manually or generated by the tutorial generator, Inkscape doesn't detect the issue.

Workaround for the tutorial: create a group with the 3 objects and apply the translation to this group instead of each object separately.

Revision history for this message
jazzynico (jazzynico) wrote :

Probably close to Bug #239430 (linked offset ungroup issue), which also deals with transform attribute.

Revision history for this message
jazzynico (jazzynico) wrote :

Workaround committed in SVN rev 22700. The tutorials will be committed in bzr later.

The only drawback is that you now have to select the objects inside a group.
The remaining bug is not due to the tutorial, but affects offsets in general, thus I close this report.
Don't hesitate to comment if you have a better workaround.

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