Changing an attribute of a class in the Selectors & CSS dialog deletes identical attributes of inline styles (+ incomplete undo transaction)
Steps to reproduce:
- open Inkscape
- Open example file: test_class_style_stroke.svg. The blue rectangles only have a class (setting fill and stroke) applied, the bottom (reddish) rectangle overwrites the fill of the class by having a fill specification inside its inline style.
- Select the topmost rectangle
- Change the fill of the class with the Selectors & CSS dialog
- Undo
What happened?
All rectangles get the new fill, the inline fill of the bottom rectangle is deleted.
After undo, only the state of the bottom rectangle is restored (giving the result I wanted to achieve in the first place), and the log shows
Ready.
Log capture started.
Incomplete undo transaction:
Event: Set attribute style to "" on #<Element:0x000000000a0210d8>
Event: Set attribute style to "" on #<Element:0x000000000a023fd8>
Event: Set attribute style to "" on #<Element:0x000000000a023ee8>
Event: Set attribute style to "" on #<Element:0x000000000a023df8>
Event: Set attribute style to "" on #<Element:0x000000000a023d08>
Event: Set attribute style to "" on #<Element:0x000000000a023c18>
Event: Set attribute style to "" on #<Element:0x000000000a023b28>
[... a lot of debug messages for the styles dialog]
Desktop, finishing reconstruction
Desktop, finishing reconstruction end
Undo again to restore the previous state. If you close the Selectors & CSS panel between the two undos, Inkscape crashes. inkscape_backtrace.txt
What should have happened?
I only wanted to change the fill of the class. No styles should be deleted when doing so.
Undo should immediately restore the previous state.
Inkscape Version and Operating System:
- Inkscape Version: 1.1-dev (12e2a09, 2020-02-19)
- Operating System: Windows 10
- Operating System version: 10.0.18362