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 { 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: {