From f634872297eba5351c19eb1ca05f37c3e0a7a032 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Thu, 4 Feb 2021 00:43:30 +0100 Subject: [PATCH] bugfix: save only hex values of chart colors Signed-off-by: Stefan Dej --- src/components/panels/ToolsPanel.vue | 5 ++++- src/store/gui/actions.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/panels/ToolsPanel.vue b/src/components/panels/ToolsPanel.vue index 5f883c7b..cbd8bc33 100644 --- a/src/components/panels/ToolsPanel.vue +++ b/src/components/panels/ToolsPanel.vue @@ -361,7 +361,10 @@ } }, setChartColor(value) { - if ("name" in this.editHeater.object) { + if ( + "name" in this.editHeater.object && + typeof value === "string" + ) { this.$store.commit('printer/tempHistory/setColor', { name: this.editHeater.object.name, value: value }) this.$store.dispatch('gui/setTempchartDatasetSetting', { name: this.editHeater.object.name, type: 'color', value: value }) } diff --git a/src/store/gui/actions.js b/src/store/gui/actions.js index 0a3ea832..91334105 100644 --- a/src/store/gui/actions.js +++ b/src/store/gui/actions.js @@ -21,7 +21,7 @@ export default { }, upload({ state, rootState }) { - let file = new File([JSON.stringify({ state })], '.mainsail.json'); + let file = new File([JSON.stringify({ state })], '.mainsail.json') window.console.log("upload .mainsail.json") window.console.log(state)