forked from 1b-agent/opencadstudio-upstream
sysvar: SELECTIONCYCLING
Selection cycling was reachable only from the status bar and Options. SELECTIONCYCLING / SETVAR now read and set it: 0 off, 1 or 2 on (the candidate list always shows). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
b28a3d0b7b
commit
9b518ff912
2 files changed
+33
No files matched your search
@@ -757,6 +757,7 @@ inventory::submit!(crate::command::CommandRegistration {
|
||||
"FIELDDISPLAY",
|
||||
"FILEDIA",
|
||||
"TRIMEXTENDMODE",
|
||||
"SELECTIONCYCLING",
|
||||
"SURFACEASSOCIATIVITY",
|
||||
"LAYOUTCREATEVIEWPORT",
|
||||
"FIELDEVAL",
|
||||
|
||||
@@ -1215,6 +1215,7 @@ impl OpenCADStudio {
|
||||
| "FIELDDISPLAY"
|
||||
| "FILEDIA"
|
||||
| "TRIMEXTENDMODE"
|
||||
| "SELECTIONCYCLING"
|
||||
| "SURFACEASSOCIATIVITY"
|
||||
| "UCSORTHO"
|
||||
| "UCSVIEW"
|
||||
@@ -1631,6 +1632,37 @@ impl OpenCADStudio {
|
||||
}
|
||||
return Some(self.finish_dispatch(cmd));
|
||||
}
|
||||
if name == "SELECTIONCYCLING" {
|
||||
// 1 and 2 both turn cycling on; the candidate list
|
||||
// always shows.
|
||||
let current = if self.selection_cycling { 2 } else { 0 };
|
||||
let prompt = format!("Enter new value for SELECTIONCYCLING <{current}>:");
|
||||
match value
|
||||
.as_deref()
|
||||
.map(|v| v.trim().parse::<i16>().ok().filter(|v| (0..=2).contains(v)))
|
||||
{
|
||||
Some(Some(mode)) => {
|
||||
if self.selection_cycling != (mode != 0) {
|
||||
self.selection_cycling = mode != 0;
|
||||
self.cycle_candidates = None;
|
||||
self.persist_settings_if_changed();
|
||||
}
|
||||
}
|
||||
Some(None) => {
|
||||
let (min, max) = (0, 2);
|
||||
self.command_line.push_error(&crate::tf!(
|
||||
"Requires an integer between {min} and {max}."
|
||||
));
|
||||
self.command_line.push_output(&prompt);
|
||||
self.pending_setvar = Some(name.clone());
|
||||
}
|
||||
None => {
|
||||
self.command_line.push_output(&prompt);
|
||||
self.pending_setvar = Some(name.clone());
|
||||
}
|
||||
}
|
||||
return Some(self.finish_dispatch(cmd));
|
||||
}
|
||||
if name == "FILEDIA" {
|
||||
let current = i16::from(crate::sys::file_dia());
|
||||
match value
|
||||
|
||||
Reference in new issue
Block a user