Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12264 closed defect (fixed)

[patch][ccla] a GFX SVG shape that has been cleared from a surface can't be added back to the surface

Reported by: cjolif Owned by: Eugene Lazutkin
Priority: high Milestone: 1.7
Component: DojoX GFX Version: 1.6.0b1
Keywords: 1.7-mobile Cc:
Blocked By: Blocking:

Description

When clearing a surface the parent reference of the removed shapes are not cleared. Thus when trying to add them back, the test that checks if the shape is already in is preventing the shape to be added back.

Additionally this can probably be the source of memory leak as a shape get a hold on the surface even after its removal. The fix consists in making sure to remove parent references when clearing the surface (dojox.gfx.shape.Container.clear).

Attached is a modified version of test_group2.html to show the issue (click to show the circle, click to clear the surface, click once more to show it back, it does not show up).

Attachments (2)

test_group2.html (1.3 KB) - added by cjolif 8 years ago.
shape.path (491 bytes) - added by cjolif 8 years ago.
patch

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by cjolif

Attachment: test_group2.html added

Changed 8 years ago by cjolif

Attachment: shape.path added

patch

comment:1 Changed 8 years ago by Eugene Lazutkin

Milestone: tbdfuture
Status: newassigned

Right. Probably we need to cascade destroy() as well.

comment:2 Changed 8 years ago by Chris Mitchell

Keywords: 1.7-mobile added

comment:3 Changed 8 years ago by Chris Mitchell

Milestone: future1.7

comment:4 Changed 8 years ago by Chris Mitchell

Resolution: fixed
Status: assignedclosed

(In [24510]) fixes #12264 a GFX SVG shape that has been cleared from a surface can't be added back to the surface

comment:5 Changed 8 years ago by Chris Mitchell

24509 refs #12264

comment:6 Changed 8 years ago by Chris Mitchell

Note: See TracTickets for help on using tickets.