From 60eb997fd4b4a8be16987726281416d65b75f1fc Mon Sep 17 00:00:00 2001 From: alan-wu Date: Tue, 12 Nov 2024 16:47:24 +1300 Subject: [PATCH] Improve state saving. --- src/components/ScaffoldTreeControls.vue | 6 ++++++ src/components/ScaffoldVuer.vue | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/ScaffoldTreeControls.vue b/src/components/ScaffoldTreeControls.vue index c5db0aa..0d8f3a4 100644 --- a/src/components/ScaffoldTreeControls.vue +++ b/src/components/ScaffoldTreeControls.vue @@ -142,6 +142,12 @@ export default { isRegion: true, }; this.addTreeItem(data.children, childRegionItem, region); + //Special case for helper region + if (path === "/_helper") { + this.$nextTick(() => { + this.$refs.treeControls.$refs.regionTree.setChecked(childRegionItem.id, false); + }); + } } _paths.shift(); return this.findOrCreateRegion(childRegionItem, _paths, path); diff --git a/src/components/ScaffoldVuer.vue b/src/components/ScaffoldVuer.vue index 0865ae7..8957a4b 100644 --- a/src/components/ScaffoldVuer.vue +++ b/src/components/ScaffoldVuer.vue @@ -2146,7 +2146,6 @@ export default { }, setURLFinishCallback: function (options) { return () => { - this.restoreSettings(options); this.localAnnotationsList.length = 0; this.updateSettingsfromScene(); this.$module.updateTime(0.01); @@ -2168,6 +2167,7 @@ export default { const {centre, size} = this.$module.getCentreAndSize(); this.boundingDims.centre = centre; this.boundingDims.size = size; + this.$nextTick(() => this.restoreSettings(options) ); this.isReady = true; }; },