replaced openScene() with openProject()

snap7
jmoenig 2021-04-22 18:49:21 +02:00
rodzic d278a91e7f
commit bc14b97a7a
2 zmienionych plików z 3 dodań i 10 usunięć

Wyświetl plik

@ -11,6 +11,7 @@
### 2021-04-22
* store, gui: first pass at deserializing multi-scene projects
* gui, scenes: migrated "new project" feature
* gui: replaced openScene() with openProject()
### 2021-04-21
* store, gui: refactored project loading structure

Wyświetl plik

@ -5207,7 +5207,7 @@ IDE_Morph.prototype.rawOpenCloudDataString = function (str) {
try {
model = this.serializer.parse(str);
this.serializer.loadMediaModel(model.childNamed('media'));
this.openScene(
this.openProject(
this.serializer.loadProjectModel(
model.childNamed('project'),
this,
@ -5220,7 +5220,7 @@ IDE_Morph.prototype.rawOpenCloudDataString = function (str) {
} else {
model = this.serializer.parse(str);
this.serializer.loadMediaModel(model.childNamed('media'));
this.openScene(
this.openProject(
this.serializer.loadProjectModel(
model.childNamed('project'),
this,
@ -5427,14 +5427,6 @@ IDE_Morph.prototype.openProject = function (project) {
this.switchToScene(project.scenes.at(1), true); // refresh album
};
IDE_Morph.prototype.openScene = function (scene) {
if (!this.isAddingScenes) {
this.scenes = new List();
}
this.scenes.add(scene);
this.switchToScene(scene, this.isAddingScenes);
};
IDE_Morph.prototype.switchToScene = function (scene, refreshAlbum) {
if (!scene || !scene.stage) {
return;