renamed scene to project again

pull/95/head
jmoenig 2021-03-11 17:40:12 +01:00
rodzic f625f86e27
commit 8878ecb71d
1 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -5355,22 +5355,22 @@ IDE_Morph.prototype.openProject = function (name) {
} }
}; };
IDE_Morph.prototype.switchToScene = function (scene) { IDE_Morph.prototype.switchToScene = function (project) {
var sprites = []; var sprites = [];
if (!scene || !scene.stage) { if (!project || !project.stage) {
return; return;
} }
this.siblings().forEach(morph => this.siblings().forEach(morph =>
morph.destroy() morph.destroy()
); );
this.projectName = scene.name; this.projectName = project.name;
this.projectNotes = scene.notes || ''; this.projectNotes = project.notes || '';
if (this.globalVariables) { if (this.globalVariables) {
this.globalVariables = scene.globalVariables; this.globalVariables = project.globalVariables;
} }
this.stage.destroy(); this.stage.destroy();
this.add(scene.stage); this.add(project.stage);
this.stage = scene.stage; this.stage = project.stage;
sprites = this.stage.children.filter( sprites = this.stage.children.filter(
child => child instanceof SpriteMorph child => child instanceof SpriteMorph
); );