forked from 1b-agent/opencadstudio-upstream
feat: SCRIPTCOMMANDS setting to turn script-driven commands off
A saved user preference (on by default) toggled by the SCRIPTCOMMANDS command gates HostApi::run_command; Cancel stays allowed so a waiting command is never stranded. The runner refuses the SCRIPTCOMMANDS command itself, so a script cannot change it. Documents why no helper-thread or stack-growing dependency was added: native builds link with at least 8 MiB, the nesting depth is fixed, and the deepest step found needs 2 to 4 MiB in a debug build. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
1 parent
a25ae4f8c0
commit
2ed41586de
8 files changed
+120
-15
No files matched your search
@@ -619,6 +619,7 @@ impl OpenCADStudio {
|
||||
constraint_bar_display: self.constraint_bar_display,
|
||||
constraint_bar_mode: self.constraint_bar_mode,
|
||||
savetime_min: self.savetime_min,
|
||||
script_commands: self.script_commands,
|
||||
default_save_format: self.default_save_format.clone(),
|
||||
pick_add: self.pick_add,
|
||||
pick_drag_rect: self.pick_drag_rect,
|
||||
@@ -723,6 +724,7 @@ impl OpenCADStudio {
|
||||
self.constraint_bar_display = s.constraint_bar_display.clamp(0, 3);
|
||||
self.constraint_bar_mode = s.constraint_bar_mode.clamp(0, 4095);
|
||||
self.savetime_min = s.savetime_min;
|
||||
self.script_commands = s.script_commands;
|
||||
self.default_save_format =
|
||||
crate::io::canonical_save_format(&s.default_save_format).to_string();
|
||||
self.pick_add = s.pick_add;
|
||||
|
||||
Reference in new issue
Block a user