From c891268672dbabbac28a535afca6b369edc74137 Mon Sep 17 00:00:00 2001
From: Paul Kaplan <pkaplan@media.mit.edu>
Date: Thu, 27 Apr 2017 11:06:33 -0400
Subject: [PATCH] Fix sprite not drawing after being added

---
 src/virtual-machine.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/virtual-machine.js b/src/virtual-machine.js
index 8e4e9bcfe..c0b762bdd 100644
--- a/src/virtual-machine.js
+++ b/src/virtual-machine.js
@@ -184,11 +184,12 @@ class VirtualMachine extends EventEmitter {
      * @param {string} json JSON string representing the sprite.
      */
     addSprite2 (json) {
-    // Select new sprite.
         sb2import(json, this.runtime, true).then(targets => {
             this.runtime.targets.push(targets[0]);
             this.editingTarget = targets[0];
-        // Update the VM user's knowledge of targets and blocks on the workspace.
+            this.editingTarget.updateAllDrawableProperties();
+
+            // Update the VM user's knowledge of targets and blocks on the workspace.
             this.emitTargetsUpdate();
             this.emitWorkspaceUpdate();
             this.runtime.setEditingTarget(this.editingTarget);