Description
The Icon Input field (Editor tab) can display incorrect values in two scenarios:
-
When you add a ToImage, set its icon, then change its ID, the Icon Input no longer displays the correct label, it shows an empty value instead of the actual icon name.
-
If two or more ToButton share the same ID, the Icon Input displays the same icon value for both elements, even if only one of them actually had an icon set.
Root cause
Icon names are stored in PyramidMainExtension currentProjectIcons, keyed only by the element's ID (<id>_icon, <id>_endIcon, <id>_innerImage). This means:
- When an element's ID changes, the dictionary key used to look up its icon (which was built from the old ID) is never updated to reflect the new ID. As a result, the new ID has no matching entry (icon appears empty), while the old entry remains in the dictionary unused, since no element has that old ID anymore.
- Two elements with the same ID inevitably collide on the same dictionary key, since there's no per-element uniqueness guarantee beyond the user-editable ID.
Description
The Icon Input field (Editor tab) can display incorrect values in two scenarios:
When you add a
ToImage, set its icon, then change its ID, the Icon Input no longer displays the correct label, it shows an empty value instead of the actual icon name.If two or more
ToButtonshare the same ID, the Icon Input displays the same icon value for both elements, even if only one of them actually had an icon set.Root cause
Icon names are stored in
PyramidMainExtension currentProjectIcons, keyed only by the element's ID (<id>_icon,<id>_endIcon,<id>_innerImage). This means: