From 32c21a1397b048d7aff3fde7a77aec40f966dcfc Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 7 Jun 2018 12:22:56 +1200 Subject: [PATCH] Fix particle property value reverting to old value when switch tabs --- scripts/system/particle_explorer/particleExplorerTool.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/system/particle_explorer/particleExplorerTool.js b/scripts/system/particle_explorer/particleExplorerTool.js index 5e5be9ead0..de2cb0bd8b 100644 --- a/scripts/system/particle_explorer/particleExplorerTool.js +++ b/scripts/system/particle_explorer/particleExplorerTool.js @@ -52,6 +52,13 @@ ParticleExplorerTool = function() { data.updatedSettings.emitOrientation = Quat.fromVec3Degrees(data.updatedSettings.emitOrientation); } Entities.editEntity(that.activeParticleEntity, data.updatedSettings); + + for (var key in data.updatedSettings) { + if (that.activeParticleProperties.hasOwnProperty(key)) { + that.activeParticleProperties[key] = data.updatedSettings[key]; + } + } + } else if (data.messageType === "page_loaded") { sendActiveParticleProperties(); }