fixed an inheritance glitch for clones

upd4.1
Jens Mönig 2017-07-11 07:50:24 +02:00
rodzic 72162136b1
commit b9f1f66ddc
2 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -3520,6 +3520,10 @@ Fixes:
------
* Objects, Threads: added experimental (only shown in dev mode) “tell ... to ..." and “ask ... for ...” primitives
170711
------
* Objects: fixed an inheritance glitch for clones
Features:

Wyświetl plik

@ -82,7 +82,7 @@ SpeechBubbleMorph, RingMorph, isNil, FileReader, TableDialogMorph,
BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, localize,
TableMorph, TableFrameMorph, normalizeCanvas, BooleanSlotMorph, HandleMorph*/
modules.objects = '2017-July-09';
modules.objects = '2017-July-11';
var SpriteMorph;
var StageMorph;
@ -1444,6 +1444,11 @@ SpriteMorph.prototype.fullCopy = function (forClone) {
c.paletteCache = {};
c.variables = this.variables.copy();
c.variables.owner = c;
arr = [];
this.inheritedAttributes.forEach(function (att) {
arr.push(att);
});
c.inheritedAttributes = arr;
if (forClone) {
c.exemplar = this;
this.addSpecimen(c);
@ -1463,6 +1468,7 @@ SpriteMorph.prototype.fullCopy = function (forClone) {
block.definition = cb;
});
});
arr = [];
this.costumes.asArray().forEach(function (costume) {
var cst = forClone ? costume : costume.copy();
arr.push(cst);