Rotation center moves on copy when units are mm (rev >= 12554)

Bug #1247799 reported by LucaDC on 2013-11-04
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Diederik van Lierop

Bug Description

I have problems when working with mm as default unit:
 - draw a rectangle;
 - move its rotation center to, for example, a corner;
 - ctrl-c, ctrl-v to duplicate the rectangle (when duplicating with ctrl-D the problem is not present);
 - the rotation center of the new object is not in the original position.

Rev. 12774.

su_v (suv-lp) wrote :

Not reproduced with Inkscape 0.48.4 on OS X 10.7.5.
Reproduced with trunk (with all available builds on this system: oldest tested revision is 10795, latest is 12777).

All trunk tests done with new default prefs in a new document based on the current 'A4' template (uses 'mm' as default units).

tags: added: regression selection transformations
su_v (suv-lp) on 2013-11-04
Changed in inkscape:
importance: Undecided → Medium
milestone: none → 0.49
status: New → Confirmed
jazzynico (jazzynico) wrote :

Also reproduced on Windows XP, Inkscape trunk revision 12840.

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

Happens in stable too, if document uses viewBox attribute:

$ diff 1247799-A4-no-viewBox.svg 1247799-A4.svg
< height="297mm">
> height="297mm"
> viewBox="0 0 210 297">

Trunk adds a viewBox attribute if the default units are changed since revision 12554.

tags: added: viewbox
summary: - Rotation center moves on copy when units are mm
+ Rotation center moves on copy when units are mm (rev >= 12554)

This should have been fixed as of rev. 13452

Changed in inkscape:
status: Triaged → Fix Committed
assignee: nobody → Diederik van Lierop (mail-diedenrezi)
LucaDC (dicappello) wrote :

Hi Diederik,
thanks for trying to fix this bug but I still experience it with a variation: after cltr-c ctrl-v there is a big y offset (around -200 and more mm) and a smaller x offset; both depend on where the center is moved with regards to its original position but the y offset is always around 200 and the x small.
Duplicating with ctrl-d still works as before.
Very annoying as to reset the center to its original position you first have to find it!

Windows XP, mm as default unit, also with default preferences.

su_v (suv-lp) wrote :

Reopening based on comment #5 (reproduced as described with r13469 on OS X 10.7.5).

Changed in inkscape:
status: Fix Committed → Triaged
Alvin Penner (apenner) wrote :

- running Windows XP, Inkscape rev 13470
- there is a scaling problem here that exists independently of the copy/paste operation, and will probably need to be fixed before the copy/paste can be fixed. In a rectangle, the parameters inkscape:transform-center-x/y do not scale the same as the parameters width, height, x, y when the document units are changed.

attached is the file rect_px.svg. It uses px as document units. Now load the file, convert document units to mm, and save it as rect_mm.svg. Now compare the two rectangles.

In rect_px.svg we have:
       inkscape:transform-center-y="55" />

In rect_mm.svg we have:
       inkscape:transform-center-y="54.999998" />

The parameters x, y, width, height have been scaled by a factor of .2822 as expected. The parameters inkscape:transform-center-x/y are unchanged, which is inconsistent. It would probably simplify the logic to make sure that all parameters are scaled at the same time. The problem with these 2 parameters is that they are not actually present if they are at the default value, so it is easy to overlook them.

Alvin Penner (apenner) wrote :

second file

LucaDC (dicappello) wrote :

Just a (probably superfluous) note to clarify that the problem does not affect rectangles only but also circles, paths and most likely all other objects.

su_v (suv-lp) wrote :

Follow-up report (regression):
- Bug #1352554 “trunk: moving object transformation center and flipping causes object to move away from center (>=13452)”

I believe that this has been properly fixed as of rev. #13521.

The rotation center will still shift though if the document units are changed in between copying and pasting, or when importing from e.g. a document in px to a document in mm (which is a similar operation as copying and pasting). This is too difficult to fix, and is not a regression, both being reasons to give this a low priority.

The whole transformation center thing is broken by design anyway IMHO...

su_v (suv-lp) on 2014-08-17
Changed in inkscape:
status: Triaged → Fix Committed
LucaDC (dicappello) wrote :

Tested with rev. 13537 and it works correctly.

Bryce Harrington (bryce) on 2015-02-23
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.

Other bug subscribers