trunk: some of the locale-based templates cause objects to be resized when default units are changed (rev >= 12557)

Bug #1236257 reported by su_v on 2013-10-07
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
High
Alvin Penner

Bug Description

Steps to reproduce:
1) launch current trunk with a different locale (e.g. DE, or FR) [1]:
$ LANG="fr_FR.UTF-8" inkscape
2) draw a rectangle and snap it to the page corners
3) open 'File > Document Properties'
4) change default unit to 'mm'

Expected result:
The units for the ruler change to 'mm', but the page size and the objects' position/dimension stay unchanged.

Actual result:
The rulers change, and the objects is scaled down at the same time.

Confirmed with r12667 on OS X 10.7.5 with "LANG=de_DE.UTF-8" and "LANG=fr_FR.UTF-8", not reproduced with documents based on default.svg, not reproduced e.g. with "LANG=it_IT.UTF-8"

Based on tests with archived builds on OS X 10.7.5:
- not reproduced with rev <= 12556
- reproduced with rev >= 12557
this unexpected behavior was introduced in
Revision 12557: Use viewBox for new documents.
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/12557>

-----
[1] Alternatively open the attached document (created with "LANG=fr_FR.UTF-8", with a page-sized rectangle already added) and continue with step 3.

su_v (suv-lp) wrote :
description: updated
description: updated
Changed in inkscape:
assignee: nobody → Matthew Petroff (matthewpetroff)
su_v (suv-lp) wrote :

Apparently does not affect files created with 0.48.4 (stable), based on the same locale (fr_FR.UTF-8) - sample attached.

su_v (suv-lp) on 2013-10-15
Changed in inkscape:
importance: Undecided → High
jazzynico (jazzynico) wrote :

Reproduced on Windows XP, Inkscape trunk revision 12688.

Changed in inkscape:
status: New → Triaged
Johan Engelen (johanengelen) wrote :

Note: change language in Inkscape preferences -> Interface

Johan Engelen (johanengelen) wrote :

Two bugs here I think.
1. when loading the default template upon booting inkscape, Inkscape will generate a viewbox attribute if it is not in the default template. But when loading the same template file from the menu, it does not generate that viewbox attribute

2. when generating the viewbox, it does not take proper document units into account. i think it assumes the width/height attrib units are the same as document units, but this is not the case for default.de.svg

Johan Engelen (johanengelen) wrote :

I fixed the second bug:
"2. when generating the viewbox, it does not take proper document units into account"
in r12717

Changed in inkscape:
assignee: Matthew Petroff (matthewpetroff) → nobody
Martin Owens (doctormo) wrote :

I can't reproduce this bug. Maybe it's because of the language specifics, but can anyone confirm it's still an issue loading templates or setting units?

jazzynico (jazzynico) wrote :

Tested again on Crunchbang Waldorf, Inkscape trunk revision 12923.
Not reproduced when loading the default template (x)or opening a template with file open.
Reproduced with the file #1.

Also reproduced with the following steps (but it might be indirectly related only):
1. Open the default template (doc1) and follow the instructions from the initial description.
2. Keep the document properties dialog open and open a new default template (doc2) with the File>New>Default menu.
3. Draw another rectangle in the new template. Note that the document unit is in px in the selector control bar and in mm in the Document Properties dialog.
4. Change the unit to cm in the Document Properties dialog -> both the rectangles in doc1 and doc2 are resized. Additional, the doc2 name is changed to doc1 in the title bar.
I only happens with a floating dialog (runs fine with a docked one).

jazzynico (jazzynico) wrote :

> Not reproduced when loading the default template (x)or opening a template with file open.

Correction: opening a template with file > new

Alvin Penner (apenner) wrote :

a partial fix has been committed to rev 13034. When changing document units, If the viewbox already exists, then it will be rescaled to produce the new viewbox. If it does not exist then the page size will be used as before.

not sure if this addresses the full report, so I just committed it here for comment.

Alvin Penner (apenner) wrote :

an improved fix has been committed to rev 13050. This corrects a problem that previously existed in the offset of viewboxes when changing units

su_v (suv-lp) wrote :

No longer reproduced with the test file from comment #1 after r13034 - closing.

@JazzyNico: AFAIU the issue with detached Document Properties dialog and multiple open documents is tracked in Bug #1284278.

Changed in inkscape:
assignee: nobody → Alvin Penner (apenner)
status: Triaged → Fix Committed
Bryce Harrington (bryce) on 2015-02-21
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