displayed object size will always reset to "pixels"

Bug #1807118 reported by Wolf
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned

Bug Description

In document settings, I set "display units" to "mm".
Then I set the unit for the size of objects to "mm" as well. After closing and relaunch of my document, the size-of-object unit is set back to "px" again, whereas I think, inkscape should remember my choice "mm". (Happens with "cm" oder "inch" as well)

Revision history for this message
Alvin Penner (apenner) wrote :

- which version of Inkscape: see Help->About
- could you attach the svg file you are using?

- similar to https://bugs.launchpad.net/inkscape/+bug/1671691 ?

Revision history for this message
Wolf (drechsel) wrote :

Sorry I should have thought about that....
Version: Inkscape 0.92.3 on ubuntu 18.04

File attached.

Yes, similar, but it happens with a newly created file as well.

Addition:
When then drawing a rectangle, again the measures are in px. I change these to mm, then draw a circle - AGAIN the measures are "px".

And:
I change "display units" in the document settings, quit inkscape. After reopening the file, they again are back to "px"

I hate "px"s - and love "mm". ((-:
(Sorry, I'm very continental...)

Revision history for this message
Alvin Penner (apenner) wrote :

thanks for the file. The problem is that this file has no viewbox. So it is likely that your default file has no viewbox either. You should probably define a new default file.

On Windows, my default file is located at:
C:\Program Files (x86)\Inkscape\share\templates\default.svg
I am attaching my default file, which has a viewbox.
If yours is different from this, you may want to try it to see if it works.

Revision history for this message
Wolf (drechsel) wrote :

Om my machine it has a viewbox. You may need to zoom out quite a bit to see it. My default svg has one as well.

Revision history for this message
Wolf (drechsel) wrote :

To be sure: "Viewbox" is the rectangular box in the background with a shadow right and bottom side, which shows the paper size, set up in documents settings? True?

Revision history for this message
Alvin Penner (apenner) wrote :

your file 'test.svg' does not have a viewbox. The viewbox is an entry in the svg tag that looks like this:

   width="210mm"
   height="297mm"
   viewBox="0 0 210 297">

The viewbox is a relatively recent addition, older files will not have one. You can force an old file to have a viewbox by following the instructions in:
https://bugs.launchpad.net/inkscape/+bug/1671691/comments/7

However that does not permanently solve the problem, it only solves it for that particular file. What you need to do is ensure that your default file has a viewbox. You can double check this by starting Inkscape and opening the XML editor, which should look like this:

Revision history for this message
Wolf (drechsel) wrote :

Allright, that works. Thank you very much, you made my day! And the day of a friend who's new to inkscape!

But now:
This behaviour can drive you crazy, my friend was close to give up with inkscape. Wouldn't it be a good idea to automatically add a viewbox to any file which does not yet have one - or prompt the user whether he wants this document to have one? (A separate handling should be there for templates.)

(I have no idea for what purpose a viewbox is useful, but it looks as if inkscape docs should have it...)

Revision history for this message
Alvin Penner (apenner) wrote :

>> Wouldn't it be a good idea to automatically add a viewbox to any file which does not yet have one

I tend to agree. To be honest, I am not sure how come you did not automatically get a viewbox, or at least a prompt telling you to make a choice. If you create a new file in Inkscape 0.48.5 it will _not_ have a viewbox. If you then open that file in a more recent version of Inkscape you will be prompted to choose how you wish to open it, which will lead to different scaling behavior. Some of these options will create a viewbox automatically, and some will not. Unfortunately the history of how this evolved is sufficiently complex that I cannot properly describe it, other than to say that any new files you create from Inkscape 0.92.3 should contain the viewbox.

(The viewbox is used for scaling, you can use it to rescale the entire image without modifying the rest of the file in any way. So if you are loading this into a browser and don't like the size, you can use the viewbox to resize the image.)

Revision history for this message
Hachmann (marenhachmann) wrote :

This pop-up doesn't work for templates, just for files that one opens (maybe it should, though).

I assume the user was using an outdated, personalized default.svg in ~/.config/inkscape/templates.

Revision history for this message
Firoz Taverbi (firoztaverbi) wrote :

Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new
bug tracker on GitLab, and closed it here.

Please feel free to file new bugs about the issues you're seeing at
http://inkscape.org/report.

Moved to: https://gitlab.com/inkscape/inbox/issues/438
Closed by: https://gitlab.com/firoztaverbi

Changed in inkscape:
status: New → Invalid
tbnorth (terry-n-brown)
tags: added: bug-migration
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.