Ungrouping objects changes position of arrow lines

Bug #552289 reported by David Dean on 2010-03-31
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Arcadie M. Cracan
inkscape (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: inkscape

In the attached file TypicalASV.svg, all the objects are grouped together into one object. If I open the file to edit it and attempt to ungroup the object, all of the arrows move below the rest of the objects. (see TypicalASV-broken.svg).

If I then try and move the arrows back to where they should be, they always move to a position offset to the lower-left of where I place them. This does not happen with the text areas, boxes or dashed line.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: inkscape 0.47.0-1ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-18.27-generic 2.6.32.10+drm33.1
Uname: Linux 2.6.32-18-generic i686
Architecture: i386
Date: Wed Mar 31 13:03:43 2010
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_AU.utf8
 SHELL=/bin/bash
SourcePackage: inkscape

David Dean (ddean-ieee) wrote :
David Dean (ddean-ieee) wrote :
David Dean (ddean-ieee) wrote :

This may be related to making the page size match the objects. If I copy and paste the group into a new A4 Inkscape document everything appears to work correctly. Just changing the page size of the original document back to A4 doesn't seem to work though.

su_v (suv-lp) wrote :

reproduced with Inkscape 0.47 r22583 and 0.47+devel r9273 on OS X 10.5.8

The lines displaced on 'Ungroup' are unconnected connector lines (inkscape:connector-type="polyline") that have transformations of nested parent groups incorrectly applied (resizing the page adds a transformation to all top layers).

possibly related reports:
Bug #479553 “Moving shape with connectors, connectors go wild”
Bug #479638 “file gets mangled due to Object->UnGroup”

Since this will have to be fixed in trunk, it is important to note that current revisions of Inkscape 0.47+devel expose a further regression:

SVG preview in the file chooser and initial display of the SVG file on-canvas renders the unconnected connector lines inside nested transformed groups incorrectly (without even ungrouping them):
- the unconnected connector lines are drawn as if they had not been transformed according to page resize
- closing the 'Export Bitmap…' dialog (after exporting the page content) changes the drawing: the unconnected connector lines move even further away from the page content
- 'undo' after a random edit restores the rendering as intended (i.e. the drawing looks the same as initially when opened in 0.47)

correct preview/initial view:
 0.47 r22583
 0.47+devel r8843
 0.47+devel r8853

incorrect preview/intial view:
 0.47+devel r8865
 0.47+devel r9273

i.e. some changes committed between r8853 and r8865 have introduced new errors when calculating the location of connector lines inside nested transformed groups.

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
tags: added: connectors groups transformations
su_v (suv-lp) wrote :

After manually removing the 'inkscape:connector-type="polyline"' attribute from the lines with arrows, the drawing renders correctly in Inkscape 0.47 and 0.47+devel r9273 - both on initial view and after ungrouping the top-level group.

Alex Valavanis (valavanisalex) wrote :

Confirmed upstream

Changed in inkscape (Ubuntu):
status: New → Confirmed
Alex Valavanis (valavanisalex) wrote :

When I open the file with inkscape_0.48.0-1ubuntu2, I can't see any arrows at all! Does anyone else experience this problem?

Changed in inkscape (Ubuntu):
importance: Undecided → Low
Changed in inkscape:
status: Confirmed → Incomplete
Changed in inkscape (Ubuntu):
status: Confirmed → Incomplete
su_v (suv-lp) wrote :

@Alex - can you zoom out and see if they are below the page borders?

Attaching screenshot from Inkscape 0.48.0 on OS X 10.5.8 (TypicalASV.svg opened in new window, unconnected connectors are displaced as described in comment #4). Distance of the vertical displacement differs depending on whether a new document window is opened or the current (unchanged) document window is reused.

su_v (suv-lp) wrote :

Still present in Inkscape 0.48+devel r9906 on OS X 10.5.8 (displaced connector lines).

Changed in inkscape:
status: Incomplete → Confirmed
su_v (suv-lp) wrote :

(see also bug #576815)

Alex Valavanis (valavanisalex) wrote :

Yes, sorry. The arrows were indeed below the page border when I initially opened the file. To confirm...
* when I open the file, the arrows are already in the wrong position (offset to the bottom left).
* when I ungroup the image, the arrows jump further to the bottom-left
* if I try to move or resize an arrow, it is offset again.

Changed in inkscape (Ubuntu):
status: Incomplete → Triaged
Changed in inkscape:
status: Confirmed → Triaged
su_v (suv-lp) wrote :

When tested and confirmed in trunk (possible also for related reports mentioned in the comments), it would be great to backport the fix to the 0.48.x branch (maybe we can get it in time for 0.48.1?).

Changed in inkscape:
assignee: nobody → Arcadie M. Cracan (acracan)
status: Triaged → Fix Committed
su_v (suv-lp) wrote :

fix was committed in revision 9988 for trunk (lp:inkscape)

Changed in inkscape:
milestone: none → 0.49
su_v (suv-lp) wrote :

Alex Valavanis wrote:
> Changed in inkscape:
> milestone: none → 0.49

I think the milestone is set too early (I didn't set it - on purpose - when changing the bug status earlier, see my comment there). IMHO that fix _needs_ to go into 0.48.1

Fix confirmed with Inkscape 0.48+devel r9989 on OS X 10.5.8

Also fixes:
Bug #576815 “after resizing document beyond the default A4 page size, moving connectors becomes buggy”
Bug #533897 “Editing a connector within a group that has been transformed returns it to its original position”
Bug #479577 “Cannot move (drag) an object”
Bug #479553 “Moving shape with connectors, disconnected ends of connectors go wild”
… (possibly others)

Does not fix (as far as I can tell):
Bug #556467 “connectors between groups misplaced (regression)”

@Arcadie or @JazzyNico - could one of you backport it to 0.48.x and set the milestone accordingly when done?

jazzynico (jazzynico) wrote :

@~suv - Unfortunately, patching the 0.48.x branch doesn't work and 'make' returns the following error:

sp-conn-end-pair.cpp: In member function ‘void SPConnEndPair::getEndpoints(Geom::Point*) const’:
sp-conn-end-pair.cpp:219: error: ‘struct SPItem’ has no member named ‘i2doc_affine’

Probably due to other changes in the trunk not backported to the branch (at least the recent c++ification).

@Arcadie, could you please see if it's not to hard or risky to make it work in the branch?

I will adapt the code for the previous, un-C++fied code. It will take about an
hour till I download the 0.48.x branch code (slow internet connection at
home). I will keep you informed.

Cheers,
   Arcadie

În data de Mie 29 Dec 2010 21:08:39 ați scris:
> @~suv - Unfortunately, patching the 0.48.x branch doesn't work and
> 'make' returns the following error:
>
> sp-conn-end-pair.cpp: In member function ‘void
> SPConnEndPair::getEndpoints(Geom::Point*) const’:
> sp-conn-end-pair.cpp:219: error: ‘struct SPItem’ has no member named
> ‘i2doc_affine’
>
> Probably due to other changes in the trunk not backported to the branch
> (at least the recent c++ification).
>
> @Arcadie, could you please see if it's not to hard or risky to make it
> work in the branch?

su_v (suv-lp) wrote :

backported to 0.48.x in r9752.

Changed in inkscape:
milestone: 0.49 → 0.48.1
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package inkscape - 0.48.1-0ubuntu1

---------------
inkscape (0.48.1-0ubuntu1) natty; urgency=low

  * New upstream version (LP: #710619). Fixes several Ubuntu bugs:
    - Node editing causes segmentation fault (LP: #544599)
    - Cursor position markers are not cleared from rulers (LP: #627134)
    - Crashes when opening document properties (LP: #658055)
    - Export to XCF error with default template (LP: #485032)
    - Editing a connector in a transformed group returns it to original
      position (LP: #533897)
    - Ungrouping objects changes position of arrow lines (LP: #552289)
    - Will not save XCF file (LP: #642417)
    - XCF export fails when exporting from unsaved document (LP: #650890)
  * Drop all patches: Applied upstream
  * debian/rules: Disable chmod on debian/patches/* in clean rule (no patches used)
 -- Alexander Valavanis <email address hidden> Tue, 01 Feb 2011 12:53:34 +0000

Changed in inkscape (Ubuntu):
status: Triaged → Fix Released
jazzynico (jazzynico) on 2011-03-05
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers