the unit for user defined document size is not refreshed if document is reopen

Bug #586955 reported by pf
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
jazzynico

Bug Description

Changes in other then px is take over in svg-code but is not refreshed in the UI after reopen the document.
See attachement

InkVer: 0.47 (Win32)

Tags: preferences ui
Revision history for this message
pf (patrischer) wrote :
su_v (suv-lp)
tags: added: ui
Revision history for this message
su_v (suv-lp) wrote :

reproduced with Inkscape 0.47 and 0.47+devel r9456 on OS X 10.5.8

The 'Custom Size' widget in 'Document Properties' dialog always reverts to 'px', disregarding both the unit chosen before the last saving of the document as well as the document's 'Default units' setting.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

1) The "Default units" setting in 'Documents properties' is stored as:

   <sodipodi:namedview (…) inkscape:document-units="mm" (…)>

2) The "Units" setting of the 'Custom Size' widget
   in 'Documents Properties' is stored as:

   <sodipodi:namedview (…) units="mm" (…)>

When opening a document the 'Custom Size' widget does not load either its own setting nor does it respect the document's "Default units" setting.

Changed in inkscape:
importance: Undecided → Low
tags: added: preferences
Alex Leone (acleone)
Changed in inkscape:
assignee: nobody → Alex Leone (acleone)
Revision history for this message
jazzynico (jazzynico) wrote :

@Alex - Are you still working on this issue?
I've almost finished a patch and just noticed this report...

Revision history for this message
jazzynico (jazzynico) wrote :

Patch successfully tested on Windows XP and Ubuntu 10.04.

The logic is:
1. If the units attribute is not set, the Units field is initialized with the document default unit.
2. If the units attribute is set, the Units field is initialized with its value.

Please test!

(I'll wait a bit to know if Alex also has a fix so that we can choose the best one).

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

Minor issue: the units for the page margins inside the 'custom size' section seem to be taken from the default units, not from the units explicitly chosen for the custom size.

See also bug #499942 “"Fit page to selection" needs margin options”, comment #12.

Tested with Inkscape 0.48+devel r9788 + bug586955.diff on OS X 10.5.8

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

oops - sorry - revert my last comment please ;) The units are taken from the custom size units selector (I tripped over my own setup, using different rulers units (default units) and misreading the actual margin sizes).

Revision history for this message
Alex Leone (acleone) wrote :

I tried to fix this a few months ago but I ran into weird xml updating bugs. My development computer is offline for a while so go ahead and commit the patch if it works. I'll test too in a week or two when I get my computer back.

Changed in inkscape:
assignee: Alex Leone (acleone) → nobody
jazzynico (jazzynico)
Changed in inkscape:
assignee: nobody → JazzyNico (jazzynico)
milestone: none → 0.48.1
status: Confirmed → In Progress
Revision history for this message
jazzynico (jazzynico) wrote :

Fix committed in the trunk (revision 9793) and in the 0.48.x branch (revision 9675).

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.