diff --git a/Step/wwwroot/src/components/tooling-equipment.ts b/Step/wwwroot/src/components/tooling-equipment.ts index 3a05b8be..739dc42b 100644 --- a/Step/wwwroot/src/components/tooling-equipment.ts +++ b/Step/wwwroot/src/components/tooling-equipment.ts @@ -101,7 +101,7 @@ export default class toolingEquipment extends Vue { this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration; this.selectedTool = item; - this.copySelectedTool = JSON.stringify(item); + this.copySelectedTool = Object.assign({}, item); this.enableParameters = true; this.enableEquipment = false; this.selectedEquipment = null; @@ -194,11 +194,11 @@ export default class toolingEquipment extends Vue { } public cancel = function () { - this.selectedTool = JSON.parse(this.copySelectedTool); if(this.selectedTool.id == null || this.selectedTool.id == 0){ this.selectedTool = null; } else{ + this.selectedTool = this.copySelectedTool; for (let l in this.selectedTool.edgesData) { if (this.selectedTool.edgesData[l].id <= 0) { this.selectedTool.edgesData.splice(l, 1);