From 01fccb791a73bd3c79604ab6b1282ef2fb0bc3ad Mon Sep 17 00:00:00 2001 From: Nathan Regner Date: Sat, 13 Jul 2024 15:25:43 -0600 Subject: [PATCH] perf: fix hang when leaving G-Code Preview page --- src/store/gcodeviewer/mutations.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/gcodeviewer/mutations.ts b/src/store/gcodeviewer/mutations.ts index 2639357a1..86e2d3682 100644 --- a/src/store/gcodeviewer/mutations.ts +++ b/src/store/gcodeviewer/mutations.ts @@ -1,7 +1,7 @@ import { getDefaultState } from './index' import { MutationTree } from 'vuex' import { GcodeviewerState } from '@/store/gcodeviewer/types' -import Vue from 'vue' +import Vue, { markRaw } from 'vue' export const mutations: MutationTree = { reset(state) { @@ -9,7 +9,7 @@ export const mutations: MutationTree = { }, setViewerBackup(state, backup) { - Vue.set(state, 'viewerBackup', backup) + Vue.set(state, 'viewerBackup', markRaw(backup) /* viewer object is large and quite slow to proxy */) }, setCanvasBackup(state, backup) {