Stroke width can't be adjusted as % in Stroke style tab

Migrated from: https://bugs.launchpad.net/inkscape/+bug/1673096 (case 1 and 2) Cases 3-5 may be a separate issue (but seems pretty linked)

Steps to reproduce:

Case 1: Single object

  1. Select an object with a non-zero stroke
  2. In Fill and Stroke Dialog > Stroke Style, change the Width unit to %
    It immediately switches back to the previous default document unit, but a smaller number.

The factor it decreases is the same within the same document - e.g. 1.06666 in one, or 3.7795 in another.

Case 2: Single object (special case)

  1. Start with a line where the stroke width is 100 (any unit).
  2. Switch to percent
    100% is correctly displayed.
  3. Switch back to other unit
    now the stroke is 0.
  4. Reset stroke width to 100 (unit)
  5. Repeat (2)
    Like in the case 1, now the stroke width is decreased with a constant factor.

Case 3: Multiple object

  1. Select multiple objects of the same stroke width.
  2. Behaves the same way as Case 1.

Case 4: Multiple object, varied widths, switch units (moved, see inbox#1612 (moved))
Case 5: Multiple object, varied widths, use % (moved, see #792 (closed))

strokwidth

What should have happened?

% option should work properly (fails to work at all really)

Tested on

  • Inkscape 1.0alpha (c3e02879, 2019-04-14) on Linux Mint 19.1
  • Inkscape 0.92.1+66 (stable PPA) on Linux Mint 17.3 (OP)
  • Inkscape 0.92.1~devel+15404-69 (ppa) on Linux Mint 17.3 (OP)
Edited by Nathan Lee