Default Units in Document Properties ignored

Bug #362995 reported by Kjohrf on 2009-04-17
Affects Status Importance Assigned to Milestone

Bug Description

Open a new document in Inkscape. On the Document Properties dialog, change all the units on the Page tab to "in".
Now make a rectange. Look at the toolbar where the size is shown and can be edited.
The units are in "px"still. Every time I start a new document I go through this...

Tags: ui Edit Tag help

You have to save and re-open the document to see your units choice propagated to all the UI selectors.
If you want to always use inches save a blank document with inches as default units as a template.
The templates are stored in the "templates" folder, inside the configuration folder (it depends on what operating system you're using. In linux is usually .inkscape; in Windows is somewhere in the Documents and Settings folder, but I don't remember where).
The default.{your locale}.svg template will be loaded everytime you open inkscape, with the chosen page properties.

Changed in inkscape:
status: New → Invalid
Kjohrf (kjohrf) wrote :

Nice, but I think it's still a bug. If you change the properties for THIS document, shouldn't it show up in THIS document? Other properties take effect immediately (e. g., paper size). Why not this one?

kjohrf: There are several bugs reports related to units and how they are implemented. Is a known situation but fortunately there is an easy workaround. Also there is a blueprint with some guidelines for a potential future implementation.
I marked this report as invalid because units are not ignored, as the summay states, although I should mark it as a duplicate.
Anyway, this has been reported already.

su_v (suv-lp) on 2010-05-28
tags: added: ui
su_v (suv-lp) wrote :

Reopening: When the current window is reused for the opened file the UI selectors are not updated to the default units of the newly opened document.

Steps to reproduce:
1) start Inkscape (without specifiying a file to load)
2) the current window and its UI selectors are based on the default template
3) open a document saved with different default units than the default template

-> Expected result:
All UI selectors (select tool, node tool, rectangle tool) are switching to the default units of the current document

-> Actual result:
All UI selectors keep the units from the default document template

Reproduced with Inkscape 0.47 and Inkscape 0.47+devel on OS X 10.5.8

Workaround: 'dirty' the new (empty) document to force Inkscape to open a new window with the document you want to edit.

Changed in inkscape:
importance: Undecided → Low
status: Invalid → Confirmed

I made a patch for this a few weeks ago. I am not able at the moment to make sure that it works with the current codebase, but it is small and doesn't touch a lot of code, so it should do.

Changed in inkscape:
assignee: nobody → Craig Marshall (craig9)
jazzynico (jazzynico) wrote :

Tested successfully on Ubuntu 10.04, Inkscape trunk revision 9778.
Using the unit tracker is a very good idea. I think I'm going to review my previous patches in order to use it too...

jazzynico (jazzynico) wrote :

@Craig - what is the status of your patch? I think it's worth committing it in the trunk, if you don't plan to modify it in a near future.

I was hoping it could be committed as is (minus the printf() and fflush() calls, which were just me debugging). Sorry I don't have a lot of spare time to dig into the code for at least a week or two.

I tested it myself in Windows 7 and the trunk code a few weeks ago and it did what I wanted. su-v did the same on mac os x.

I don't plan to modify it further unless someone either discovers a bug or provides a better way to solve the problem.

jazzynico (jazzynico) wrote :

Great! Since it works on Ubuntu, OSX and XP and Seven, I guess it's safe to commit it now.
It's in the trunk (revision 9780) and the 0.48.x branch (revision 9671).
Thanks again for your patch!

Changed in inkscape:
milestone: none → 0.48.1
status: Confirmed → Fix Committed
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.

Other bug subscribers