Scope plugin config overrides per preset type

Replace the shared plugin_config_overrides key with print/printer/filament
scoped keys so merging presets into one full config cannot clobber an edited
override, letting a slicing plugin config change invalidate the slice step.
This commit is contained in:
SoftFever
2026-07-25 15:28:14 +08:00
parent b5430b53e7
commit 6e1a6cc678
15 changed files with 138 additions and 106 deletions
@@ -490,6 +490,8 @@ _CONFIG_UI = """
draw();
restoreReadout();
refreshState();
labelRestore();
setInputsEnabled(!context.readOnly);
}
// "Restore defaults" writes the plugin's own defaults globally, but in a preset it discards that
@@ -513,8 +515,6 @@ _CONFIG_UI = """
buildRows();
load(window.orca ? window.orca.getConfig() : {});
labelRestore();
setInputsEnabled(!context.readOnly);
document.getElementById("save").addEventListener("click", function () {
if (!window.orca) return;
@@ -532,8 +532,6 @@ _CONFIG_UI = """
if (first) { first = false; return; }
if (window.orca.getContext) context = window.orca.getContext();
load(config);
labelRestore();
setInputsEnabled(!context.readOnly);
announce("Saved");
});
}