Remove superfluous variable

This commit is contained in:
David Rowe 2018-05-30 17:16:08 +12:00
parent 03cec8cb54
commit 8c9bdf51a7

View file

@ -2362,7 +2362,6 @@ var showMenuItem = propertyMenu.addMenuItem("Show in Marketplace");
var propertiesTool = new PropertiesTool();
var particleExplorerTool = new ParticleExplorerTool();
var selectedParticleEntity = 0;
var selectedParticleEntityID = null;
function selectParticleEntity(entityID) {
@ -2376,7 +2375,6 @@ function selectParticleEntity(entityID) {
particleExplorerTool.destroyWebView();
particleExplorerTool.createWebView();
selectedParticleEntity = entityID;
particleExplorerTool.setActiveParticleEntity(entityID);
particleExplorerTool.setActiveParticleProperties(properties);
@ -2401,13 +2399,13 @@ entityListTool.webView.webEventReceived.connect(function (data) {
var ids = data.entityIds;
if (ids.length === 1) {
if (Entities.getEntityProperties(ids[0], "type").type === "ParticleEffect") {
if (JSON.stringify(selectedParticleEntity) === JSON.stringify(ids[0])) {
if (JSON.stringify(selectedParticleEntityID) === JSON.stringify(ids[0])) {
// This particle entity is already selected, so return
return;
}
// Destroy the old particles web view first
} else {
selectedParticleEntity = 0;
selectedParticleEntityID = 0;
particleExplorerTool.destroyWebView();
}
}