Describe the bug
Creating a group on top of another group breaks the export: The JSON contains the second group twice (with the same ID). This causes the import to fail.
This bug only happens when the second group is created while the mouse is within another group:
(the mouse cursor is not shown in this sceenshot, but you can see that the first group - named "1" - is highlighted because the mouse is hovering over it)
To Reproduce
Steps to reproduce the behavior:
- Click on 'Group' in the palette and place it on the canvas.
- Click on 'Group' in the palette and move the mouse so that the preview of the new group overlaps with the existing group and that the mouse cursor hovers over the first group.
- Click on the canvas to create a second group that overlaps with the first one.
- Export as .egn or .egn.svg
- The JSON contains 3 groups: The first one, the second one and a duplicate of the second one. See for example attached file.
- Import the .egn or egn.svg and open the browser console: The import will fail and stop after it has encountered the element with the duplicate ID.

Screenshots
[If applicable, add screenshots to help explain your problem.]
Version
- Egon: v2.1.0
- Browser: Firefox, Chrome
- OS: Windows, MacOS
Describe the bug
Creating a group on top of another group breaks the export: The JSON contains the second group twice (with the same ID). This causes the import to fail.
This bug only happens when the second group is created while the mouse is within another group:
(the mouse cursor is not shown in this sceenshot, but you can see that the first group - named "1" - is highlighted because the mouse is hovering over it)
To Reproduce
Steps to reproduce the behavior:
Screenshots
[If applicable, add screenshots to help explain your problem.]
Version