Change in unit rounds value.

Bug #1075793 reported by cako
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

In Stroke Width, changing units from generates rounding errors.

Steps to reproduce:
1. Create path.
2. Change unit to mm
3. Set value to 0.1 mm
4. Change unit to m
5. Change unit back to mm

The expected behaviour is to have the value switch back to 0.1 mm. However, since the conversion is rounded, it changes back to 0mm.

Tags: ui units stroke
Revision history for this message
Alvin Penner (apenner) wrote :

- not reproduced on Windows 7, Inkscape 0.48.3.1
- not reproduced on Windows XP, recent trunk build
- could you indicate which OS you are using, and which version of Inkscape?
- are you using the Fill and Stroke dialog to switch from mm to m and back?

Revision history for this message
cako (goldencako) wrote :

Using Ubuntu 12.04. Version: Inkscape 0.48.3.1 r9886 (Mar 29 2012)
Yes, I am using the Fill and Stroke dialog.

su_v (suv-lp)
tags: added: stroke ui units
Revision history for this message
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.48.3.1 on OS X 10.7.4,
not reproduced with current trunk 0.48+devel r11862

When monitoring the stroke width live-updating in the XML Editor, the width reverts to '0' (px) as soon as the unit menu is clicked in step 5 (current stable version only). Current trunk retains the width in px in the SVG source, even if it displays 0.000 m in the GUI after step 4 (due to rounding error (?)).

Proposing to close as 'FIx Committed', milestone 0.49.

Revision history for this message
Devon (devonfyson) wrote :

Have the same issue except when changing from mm to m then back to mm, it goes from 0.100mm to 0.001m to 1.000mm but the image hasn't changed. Looking at the XML editor, the values have not changed either. However if you then select one of the H/W/X/Y boxes then select another, suddenly the values in the xml editor, box and the image all change to 0.699mm. If instead of selecting two input boxes you select off the image, then re-select it, nothing changes.

Using Inkscape 0.48.5 r10040 on Ubuntu 14.10.

Revision history for this message
Devon (devonfyson) wrote :

Updated to Inkscape 0.91 and no longer have this problem. Changing between units stays the same so long as you don't click on the input box of that unit.

However did come across a related bug whereby if you click on the inputbox after changing to meters (which now rounds down to 0.000) then switch back to mm, it now shows 0.000 but the image hasn't changed. If you hit enter in the width input box while in meters or mm showing 0.000 it still doesn't change. But if you click some random combination of H/W/X/Y 3-4 times it updates in certain sequences.

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.