kopia lustrzana https://github.com/backface/turtlestitch
make sure inheritance hierarchies are consistently made temporary
rodzic
ad0d0f7803
commit
a5a3d5cf65
|
@ -3669,6 +3669,7 @@ Fixes:
|
|||
* GUI: enable experimental setting for "ternary Boolean slots"
|
||||
* GUI, Blocks: experimental feature: Download script, thanks, Bernat!
|
||||
* Blocks: made "import script" undoable
|
||||
* Objects: make sure inheritance hierarchies are consistently made temporary
|
||||
|
||||
|
||||
v4.1 Features:
|
||||
|
|
11
objects.js
11
objects.js
|
@ -83,7 +83,7 @@ BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, localize,
|
|||
TableMorph, TableFrameMorph, normalizeCanvas, BooleanSlotMorph, HandleMorph,
|
||||
AlignmentMorph*/
|
||||
|
||||
modules.objects = '2017-September-25';
|
||||
modules.objects = '2017-September-28';
|
||||
|
||||
var SpriteMorph;
|
||||
var StageMorph;
|
||||
|
@ -3412,6 +3412,10 @@ SpriteMorph.prototype.perpetuate = function () {
|
|||
var stage = this.parentThatIsA(StageMorph),
|
||||
ide = this.parentThatIsA(IDE_Morph);
|
||||
|
||||
// make sure my exemplar-chain is fully perpetuated
|
||||
if (this.exemplar) {
|
||||
this.exemplar.perpetuate();
|
||||
}
|
||||
if (!this.isTemporary || !stage || !ide) {
|
||||
return;
|
||||
}
|
||||
|
@ -3446,9 +3450,14 @@ SpriteMorph.prototype.release = function () {
|
|||
if (this.isTemporary || !this.exemplar || !stage || !ide) {
|
||||
return;
|
||||
}
|
||||
|
||||
// make sure all parts and instances are also released
|
||||
this.parts.forEach(function (part) {
|
||||
part.release();
|
||||
});
|
||||
this.instances.forEach(function (inst) {
|
||||
inst.release();
|
||||
});
|
||||
this.isTemporary = true;
|
||||
this.name = '';
|
||||
this.cloneOriginName = this.exemplar.name;
|
||||
|
|
Ładowanie…
Reference in New Issue