From 51dbb027e8f5a6ba38718d7b659ff5cfb9b26772 Mon Sep 17 00:00:00 2001 From: Brian Broll Date: Fri, 5 Jun 2020 09:49:29 -0500 Subject: [PATCH] Only update the operation code if not reserved attribute. Fix #1726 (#1727) --- .../OperationInterfaceEditorControl.EventHandlers.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/visualizers/panels/OperationInterfaceEditor/OperationInterfaceEditorControl.EventHandlers.js b/src/visualizers/panels/OperationInterfaceEditor/OperationInterfaceEditorControl.EventHandlers.js index 38a78b447..f76e5e541 100644 --- a/src/visualizers/panels/OperationInterfaceEditor/OperationInterfaceEditorControl.EventHandlers.js +++ b/src/visualizers/panels/OperationInterfaceEditor/OperationInterfaceEditorControl.EventHandlers.js @@ -2,11 +2,13 @@ define([ 'panels/EasyDAG/EasyDAGControl.WidgetEventHandlers', 'deepforge/OperationCode', + 'deepforge/Constants', './Colors', 'text!panels/ForgeActionButton/Libraries.json', ], function( EasyDAGControlEventHandlers, OperationCode, + Constants, COLORS, LibrariesText ) { @@ -265,7 +267,10 @@ define([ } else if (nodeId === this._currentNodeId) { // edit operation attributes msg = `Setting attribute default ${attr}->${value} in ${name}`; this._client.startTransaction(msg); - this.updateCode(operation => operation.setAttributeDefault(attr, value)); + const isOperationAttribute = !Object.values(Constants.OPERATION).includes(attr); + if (isOperationAttribute) { + this.updateCode(operation => operation.setAttributeDefault(attr, value)); + } EasyDAGControlEventHandlers.prototype._saveAttributeForNode.apply(this, arguments); this._client.completeTransaction(); }