Synchronize units on control and settings pages.

This commit is contained in:
saifullah-N
2023-06-22 18:26:10 +05:30
parent adf2a90096
commit 59005b4c3a
2 changed files with 4 additions and 1 deletions

View File

@@ -417,7 +417,8 @@ module.exports = new Vue({
delete settings.tool["tool-type"];
this.config["selected-tool-settings"][selected_tool] = settings;
this.display_units = this.config.settings["units"];
try {
await api.put("config/save", this.config);
this.modified = false;

View File

@@ -91,7 +91,9 @@ module.exports = {
return this.$root.display_units;
},
set: function(value) {
this.config.settings.units = value;
this.$root.display_units = value;
this.$dispatch("config-changed");
}
},