From a298f4d8a05c6e511625c122ae4d6aedd9dd0469 Mon Sep 17 00:00:00 2001 From: Nicola Carminati Date: Wed, 30 May 2018 12:26:21 +0200 Subject: [PATCH] Fix --- Step/wwwroot/src/components/tooling-equipment.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Step/wwwroot/src/components/tooling-equipment.ts b/Step/wwwroot/src/components/tooling-equipment.ts index 6a9bdbd6..edbedb54 100644 --- a/Step/wwwroot/src/components/tooling-equipment.ts +++ b/Step/wwwroot/src/components/tooling-equipment.ts @@ -97,7 +97,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; @@ -190,11 +190,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);