From 089df0a50f0b92508638e87aeb9ad33c6bf7ca95 Mon Sep 17 00:00:00 2001 From: Karishma Chadha Date: Wed, 14 Feb 2018 16:52:41 -0500 Subject: [PATCH] Sounds get updated in storage and vm runtime when they are updated in the sound editor. The updateSvg function ensures that the costume that was edited has an updated dataFormat property in the vm runtime. This is specifically for when pngs get edited in the vector editor. Their file format should then get updated to svg. --- src/virtual-machine.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/virtual-machine.js b/src/virtual-machine.js index be4b5c551..919208984 100644 --- a/src/virtual-machine.js +++ b/src/virtual-machine.js @@ -513,6 +513,9 @@ class VirtualMachine extends EventEmitter { storage.DataFormat.SVG, (new TextEncoder()).encode(svg) ); + // If we're in here, we've edited an svg in the vector editor, + // so the dataFormat should be 'svg' + costume.dataFormat = storage.DataFormat.SVG; this.emitTargetsUpdate(); }