This is a recreation of PR #2983, since that one erroneously used our fork's master, which has since gotten additional commits. See that PR for previous discussion.
When calling SVGShapeElement.reloadShapes(), searchShapes() will correctly reconcile modified and added shapes and reuse their elements. However, it will call setElementStyles(), which will add all style elements unconditionally to this.stylesList, even if the styles were already in there, making it grow indefinitely and causing other problems down the line.
Modify setElementStyles() to check for the existence of a particular style before adding it.
This is a recreation of PR #2983, since that one erroneously used our fork's
master
, which has since gotten additional commits. See that PR for previous discussion.When calling
SVGShapeElement.reloadShapes()
,searchShapes()
will correctly reconcile modified and added shapes and reuse their elements. However, it will callsetElementStyles()
, which will add all style elements unconditionally tothis.stylesList
, even if the styles were already in there, making it grow indefinitely and causing other problems down the line.Modify
setElementStyles()
to check for the existence of a particular style before adding it.