From b015845371c378cd6f7553339567e16cad06ac36 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 18 Jul 2018 11:34:37 -0700 Subject: [PATCH] Disable showing the entity edit tools when undoing while disabled --- scripts/system/edit.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/system/edit.js b/scripts/system/edit.js index 0789e1fac2..a173655e17 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -1918,7 +1918,11 @@ function applyEntityProperties(data) { Entities.deleteEntity(entityID); } - selectionManager.setSelections(selectedEntityIDs); + // We might be getting an undo while edit.js is disabled. If that is the case, don't set + // our selections, causing the edit widgets to display. + if (isActive) { + selectionManager.setSelections(selectedEntityIDs); + } } // For currently selected entities, push a command to the UndoStack that uses the current entity properties for the