make sure to fully remove parts from their anchor when deleting them

upd4.1
Jens Mönig 2017-10-11 09:01:50 +02:00
rodzic e7148bbf4f
commit 982bea19f7
2 zmienionych plików z 9 dodań i 1 usunięć

Wyświetl plik

@ -3691,6 +3691,11 @@ Fixes:
------
* Blocks: fixed #1885
171010
------
* Objects: make sure to fully remove parts from their anchor when deleting them
v4.1 Features:
* polymorphic sprite-local custom blocks

Wyświetl plik

@ -83,7 +83,7 @@ BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, localize,
TableMorph, TableFrameMorph, normalizeCanvas, BooleanSlotMorph, HandleMorph,
AlignmentMorph*/
modules.objects = '2017-October-04';
modules.objects = '2017-October-11';
var SpriteMorph;
var StageMorph;
@ -6007,6 +6007,9 @@ SpriteMorph.prototype.restoreLayers = function () {
SpriteMorph.prototype.destroy = function () {
// make sure to sever all inheritance ties to other sprites
if (this.anchor) {
this.anchor.detachPart(this);
}
this.emancipate();
if (!this.isTemporary) {
this.prune();