Select the stage if the project has no sprites

This commit is contained in:
Ray Schamp 2017-05-11 02:24:10 -04:00
parent 635b40ec2b
commit 33fc797868

View file

@ -222,7 +222,11 @@ class VirtualMachine extends EventEmitter {
}
}
// Select the first target for editing, e.g., the first sprite.
if (this.runtime.targets.length > 1) {
this.editingTarget = this.runtime.targets[1];
} else {
this.editingTarget = this.runtime.targets[0];
}
// Update the VM user's knowledge of targets and blocks on the workspace.
this.emitTargetsUpdate();