Unset fill/stroke don't reset fill-opacity or stroke-opacity, forcing clones to inherit alpha
Migrated from https://bugs.launchpad.net/inkscape/+bug/1183400
Steps to reproduce:
- open Inkscape
- create a rectangle
- open the fill and stroke dialog
- change the fill-opacity of the rectangle to 50 then back to 100%
- Change the fill to Unset (The ? icon in the Fill and stroke dialog)
- Now make a clone of it (Alt+D) and move it to the side
- On the new clone set a new different fill color
- Now set the fill's alpha value to something different than 255
What happened?
- fill-opacity was not unset from the rectangle
- thus clone inherited the
Analysis from OP, note the fill-opacity:1
in the "bad" file.
<!-- GOOD FILE XML -->
<rect id="good"
style="fill-rule:evenodd;"
width="100" height="100" />
<!-- BAD FILE XML -->
<rect id="bad"
style="fill-rule:evenodd;fill-opacity:1"
width="100" height="100" />
What should have happened?
- Unclear. Probably default behavior for the Unset option is to affect alpha too, but ultimately it isn't wrong for alpha to be kept as a separate property.
- Some GUI way to control fill-opacity when fill is unset might be required
Version info
- Inkscape 1.2-dev (742c897e91, 2021-11-07) Linux Mint 20
- First reported 0.48.4 r9939 Windows 7