Clones of 'Transformed' groups, gain double transform tags when the main group is ungrouped
Summary:
Found a possible edge case, where I don't think Inkscape is properly behaving itself when it comes to unlinking clones. I created a group of a path, so that I could store the 'transform' tag in the group and leave the original path's node locations as-is. So, I then go ahead and clone said group (since I needed a couple extra copies of it) and adjust their locations to what I needed (only shifted their placement, didn't resize them).
Then, for the fun of it, I then 'ungroup' the original item, and Inkscape does that fine. However, when the clones unlink themselves due to the group being no-more, they shrink to something like 10% of their original size. So, I save a copy of the file (so not to damage the original), and noticed in a text editor, that the former clones were given 2 separate transform tags (one on the 'new' group, and one on the path in side the group). I don't think that's suppose to be happening. The 'transform' tag should only be on the group (like the original one), but it shouldn't be adding one to the path inside of the group in this case. If I were however to 'manually' unlink the cloned group, that works as expected and leaves the item as-is without the extra transform issue.
Tested this in a few other versions of Inkscape, and this 'at least' affects 1.1.2+ (didn't go any farther back).
At least the issue can be worked around, as in the file, you can just manually delete the 'transform' tag on the path, and then it returns to it's proper size/location. However, I could see how this could really freak out somebody if they had 5-10 clones of a group and their document gets messed up like this, especially if it's huge. With this test file, it's easy to fix due to it being small, but larger files would be a pain just to find the problem area in a text editor to fix it.
But still, Inkscape shouldn't be adding the extra 'transform' tag in the first place here to the path inside of the group.
After (the ungroup of the 'first' 0):
Steps to reproduce:
- Open attached file. group_clone_bug.svg
- Select the '0' under the pink Star.
- Ungroup (Shift+Ctrl+G) the '0'.
What happened?
The 2 clones (when unlinked by Inkscape due to the ungroup) to the right are transformed improperly due to an errant transform tag being added to the path when it shouldn't have been, that is inside of the group which also got the transform tag.
What should have happened?
The 2 clones (when unlinked by Inkscape due to the ungroup) should retain their size & location.
Version info
Inkscape 1.1.2 (b8e25be833, 2022-02-05) x64
Inkscape 1.3 (0e150ed6c4, 2023-07-21) x64
Windows x64