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.
This commit is contained in:
Richard 2021-06-03 16:21:03 +01:00
parent 318c4088dd
commit 03cb019864

View file

@ -276,6 +276,9 @@ import keyvalList from "../../fieldComponents/keyvalList";
import taskSubmitter from "../../genericComponents/taskSubmitter"; import taskSubmitter from "../../genericComponents/taskSubmitter";
import { syncDataWithLocalStorage } from "../../../syncDataWithLocalStorage"; import { syncDataWithLocalStorage } from "../../../syncDataWithLocalStorage";
/**
* The capture settings that should persist in local storage are these ones
*/
function defaultCaptureSettings() { function defaultCaptureSettings() {
return { return {
filename: "", filename: "",
@ -284,7 +287,6 @@ function defaultCaptureSettings() {
storeBayer: false, storeBayer: false,
resizeCapture: false, resizeCapture: false,
captureNotes: "", captureNotes: "",
scanCapture: false,
scanDeltaZ: "Fast", scanDeltaZ: "Fast",
scanStyle: "Raster", scanStyle: "Raster",
namingStyle: "Coordinates", namingStyle: "Coordinates",
@ -318,9 +320,10 @@ export default {
}, },
data: function() { data: function() {
// I've split this out so I can use the keys elsewhere, and to allow return {
// for some data in the future that isn't in defaultCaptureSettings(); ...defaultCaptureSettings(),
return defaultCaptureSettings(); scanCapture: false // Don't remember the "scan" tickbox in local storage.
};
}, },
computed: { computed: {