Changing order of items in a mask doesn't affect rendering till restart

Migrated partly from https://bugs.launchpad.net/inkscape/+bug/794472

Steps to reproduce:

  • open Inkscape
  • open multiobject-mask.svg
  • Open XML Editor dialog
  • Expand defs, then the mask
  • swap order of rectangles
  • save and the reopen file

What happened?

  • rendering doesn't update till reopen.
  • note: update does happen correctly if objects in the mask are all in a single group

What should have happened?

  • changing order of items in a mask should effect rendering immediately

Version info

  • Inkscape 1.2-dev (c903a514, 2022-01-31) Linux Mint 20
  • Inkscape 1.0.2 (f38d80df, 2021-05-16) Linux Mint 20
  • Note: before this file didn't even render correctly. This was fixed in 298c79f4
Edited by Nathan Lee