diff --git a/Step/wwwroot/src/components/tooling/tooling-equipment.ts b/Step/wwwroot/src/components/tooling/tooling-equipment.ts index eb0eab73..59dfa08d 100644 --- a/Step/wwwroot/src/components/tooling/tooling-equipment.ts +++ b/Step/wwwroot/src/components/tooling/tooling-equipment.ts @@ -367,23 +367,23 @@ export default class toolingEquipment extends Vue { } public cancel = function () { - if(this.isSiemens){ - if (this.copySelectedTool) { - this.selectedTool = this.copySelectedTool; - toolingActions.updateTool(store, this.copySelectedTool); - } - } - else{ - if (this.copySelectedTool) { - this.selectedTool = this.copySelectedTool; - toolingActions.updateNcTool(store, this.copySelectedTool); - } - } + debugger if (this.selectedTool.id == null || this.selectedTool.id == 0) { this.selectedTool = null; } else { - + if(this.isSiemens){ + if (this.copySelectedTool) { + this.selectedTool = this.copySelectedTool; + toolingActions.updateTool(store, this.copySelectedTool); + } + } + else{ + if (this.copySelectedTool) { + this.selectedTool = this.copySelectedTool; + toolingActions.updateNcTool(store, this.copySelectedTool); + } + } for (let l in this.selectedTool.edgesData) { if (this.selectedTool.edgesData[l].id <= 0) { this.selectedTool.edgesData.splice(l, 1); @@ -403,6 +403,7 @@ export default class toolingEquipment extends Vue { } public cancelNc = function () { + debugger if(this.copySelectedTool && this.selectedTool.id > 0){ this.selectedTool = this.copySelectedTool; toolingActions.updateNcTool(store, this.copySelectedTool); diff --git a/Step/wwwroot/src/components/tooling/tooling-families.vue b/Step/wwwroot/src/components/tooling/tooling-families.vue index 340fa9f8..4f518df1 100644 --- a/Step/wwwroot/src/components/tooling/tooling-families.vue +++ b/Step/wwwroot/src/components/tooling/tooling-families.vue @@ -145,7 +145,7 @@ diff --git a/Step/wwwroot/src/components/tooling/tooling-shanks.ts b/Step/wwwroot/src/components/tooling/tooling-shanks.ts index e59bf06b..805ed7d6 100644 --- a/Step/wwwroot/src/components/tooling/tooling-shanks.ts +++ b/Step/wwwroot/src/components/tooling/tooling-shanks.ts @@ -317,6 +317,7 @@ export default class toolingShanks extends Vue { } public cancel = function () { + debugger if(this.selectedTool.id == null || this.selectedTool.id == 0){ this.selectedTool = null; } @@ -337,11 +338,23 @@ export default class toolingShanks extends Vue { } public cancelNc = function () { - + debugger if(this.selectedTool.id == null || this.selectedTool.id == 0){ this.selectedTool = null; } else{ + if(this.isSiemens){ + if (this.copySelectedTool) { + this.selectedTool = this.copySelectedTool; + toolingActions.updateTool(store, this.copySelectedTool); + } + } + else{ + if (this.copySelectedTool) { + this.selectedTool = this.copySelectedTool; + toolingActions.updateNcTool(store, this.copySelectedTool); + } + } for (let l in this.selectedTool.childsTools) { if (this.selectedTool.childsTools[l].id <= 0) { this.selectedTool.childsTools.splice(l, 1); @@ -351,7 +364,6 @@ export default class toolingShanks extends Vue { } } } - this.selectedTool = this.copySelectedTool; this.enableAddToolToShank = false; this.enableModify = false; this.disableList = false;