From 03cb019864fc0fc611fa080178268a8c855e1c40 Mon Sep 17 00:00:00 2001 From: Richard Date: Thu, 3 Jun 2021 16:21:03 +0100 Subject: [PATCH] Don't remember the "scanCapture" setting Given that it changes the "capture" button from single image acquisition to a long running scan, I think it's less confusing if the "scan capture" setting is not remembered across page refreshes. --- .../captureComponents/paneCapture.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/openflexure_microscope/api/static/src/components/tabContentComponents/captureComponents/paneCapture.vue b/openflexure_microscope/api/static/src/components/tabContentComponents/captureComponents/paneCapture.vue index 2c99aff4..1db6f96b 100644 --- a/openflexure_microscope/api/static/src/components/tabContentComponents/captureComponents/paneCapture.vue +++ b/openflexure_microscope/api/static/src/components/tabContentComponents/captureComponents/paneCapture.vue @@ -276,6 +276,9 @@ import keyvalList from "../../fieldComponents/keyvalList"; import taskSubmitter from "../../genericComponents/taskSubmitter"; import { syncDataWithLocalStorage } from "../../../syncDataWithLocalStorage"; +/** + * The capture settings that should persist in local storage are these ones + */ function defaultCaptureSettings() { return { filename: "", @@ -284,7 +287,6 @@ function defaultCaptureSettings() { storeBayer: false, resizeCapture: false, captureNotes: "", - scanCapture: false, scanDeltaZ: "Fast", scanStyle: "Raster", namingStyle: "Coordinates", @@ -318,9 +320,10 @@ export default { }, data: function() { - // I've split this out so I can use the keys elsewhere, and to allow - // for some data in the future that isn't in defaultCaptureSettings(); - return defaultCaptureSettings(); + return { + ...defaultCaptureSettings(), + scanCapture: false // Don't remember the "scan" tickbox in local storage. + }; }, computed: {