From 8861f3fc52a25bebe0818325e50164086d812d66 Mon Sep 17 00:00:00 2001 From: Alessandro Francia Date: Thu, 6 Sep 2018 10:49:53 +0200 Subject: [PATCH 1/2] fix lsot tool and shank selected --- .../components/tooling/tooling-equipment.ts | 27 ++++++++++--------- .../src/components/tooling/tooling-shanks.ts | 16 +++++++++-- 2 files changed, 28 insertions(+), 15 deletions(-) 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-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; From 80dee74b07124281c2fe42a2cc37eec48f4b79e6 Mon Sep 17 00:00:00 2001 From: Alessandro Francia Date: Thu, 6 Sep 2018 10:54:06 +0200 Subject: [PATCH 2/2] fix double button cancel families --- Step/wwwroot/src/components/tooling/tooling-families.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@