forked from 1b-agent/opencadstudio-upstream
Frames: state-following ribbon list, DWF/DGN frames, image frame encoding and profile, frame-only picking
- The Frames list shows the drawing's frame state (hide / display and plot / display but not plot / frames vary), follows commands, undo and document switches, and lists the mixed state as a disabled item. - DWFFRAME and DGNFRAME are frame variables of their own, kept in the header, and FRAME sets them with the others. - Out-of-range frame values say "Requires an integer between 0 and 2." and ask again; a set value reports "Regenerating model.". - IMAGEFRAME is stored in the image variables as bits (2 is written as 3) and a drawing without them uses the profile value, which setting IMAGEFRAME updates and the settings file keeps. - Raster images, PDF underlays and wipeouts are picked on their frame only; underlay snap geometry is never picked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
801882314f
commit
7f8f8457c7
72 files changed
+451
-65
No files matched your search
@@ -618,6 +618,8 @@ inventory::submit!(crate::command::CommandRegistration {
|
||||
"FRAME",
|
||||
"IMAGEFRAME",
|
||||
"PDFFRAME",
|
||||
"DWFFRAME",
|
||||
"DGNFRAME",
|
||||
"PDFOSNAP",
|
||||
"UOSNAP",
|
||||
"PDFIMPORTMODE",
|
||||
@@ -630,6 +632,7 @@ inventory::submit!(crate::command::CommandRegistration {
|
||||
"WIPEOUTFRAME",
|
||||
"FRAMES0",
|
||||
"FRAMES1",
|
||||
"FRAMES3",
|
||||
"FRAMES2",
|
||||
"UOSNAP0",
|
||||
"UOSNAP1",
|
||||
|
||||
@@ -10,6 +10,8 @@ impl OpenCADStudio {
|
||||
"FRAMES0" => return self.dispatch_styleprops("SETVAR FRAME 0", i),
|
||||
"FRAMES1" => return self.dispatch_styleprops("SETVAR FRAME 1", i),
|
||||
"FRAMES2" => return self.dispatch_styleprops("SETVAR FRAME 2", i),
|
||||
// The mixed state is shown, never chosen.
|
||||
"FRAMES3" => return Some(Task::none()),
|
||||
"UOSNAP0" => return self.dispatch_styleprops("SETVAR UOSNAP 0", i),
|
||||
"UOSNAP1" => return self.dispatch_styleprops("SETVAR UOSNAP 1", i),
|
||||
// COLOR <ByLayer|ByBlock|1-255|name> — the colour applied to new
|
||||
@@ -1017,6 +1019,8 @@ impl OpenCADStudio {
|
||||
| "FRAME"
|
||||
| "IMAGEFRAME"
|
||||
| "PDFFRAME"
|
||||
| "DWFFRAME"
|
||||
| "DGNFRAME"
|
||||
| "PDFOSNAP"
|
||||
| "UOSNAP"
|
||||
| "PDFIMPORTMODE"
|
||||
@@ -1283,13 +1287,23 @@ impl OpenCADStudio {
|
||||
self.tabs[i].scene.bump_entities(&changes);
|
||||
}
|
||||
self.tabs[i].dirty = true;
|
||||
// IMAGEFRAME also lands in the profile.
|
||||
self.save_config();
|
||||
}
|
||||
self.command_line
|
||||
.push_output(&crate::tf!("{name} = {mode}"));
|
||||
.push_output(crate::t!("Regenerating model.").as_ref());
|
||||
}
|
||||
// Out of range: say so and ask again.
|
||||
_ => {
|
||||
self.command_line.push_error(
|
||||
crate::t!("Requires an integer between 0 and 2.").as_ref(),
|
||||
);
|
||||
self.command_line.push_output(
|
||||
crate::tf!("Enter new value for {name} <{current}>:")
|
||||
.as_ref(),
|
||||
);
|
||||
self.pending_setvar = Some(name.clone());
|
||||
}
|
||||
_ => self.command_line.push_error(
|
||||
crate::tf!("SETVAR: {name} requires 0, 1, or 2.").as_ref(),
|
||||
),
|
||||
},
|
||||
None => {
|
||||
self.command_line.push_output(crate::tf!(
|
||||
|
||||
Reference in new issue
Block a user