forked from 1b-agent/opencadstudio-upstream
fix(field): bound the Field dialog's automation indices; ASCII browse button
#1585's field_dialog action stored any index it was given, and the dialog indexes its category, case, size, named-type, formula, precision and plot scale lists with them, so an out-of-range value panicked while drawing. They are checked against the list lengths now. The hyperlink browse button drew a glyph (…) that is tofu without the font, and two of the new local_header_dates calls were mis-indented. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
0de1e91f99
commit
a21aef2a11
3 files changed
+20
-12
No files matched your search
+2
-2
@@ -765,7 +765,7 @@ pub fn load_bytes(name: &str, bytes: Vec<u8>) -> Result<CadDocument, String> {
|
||||
.map_err(|e| e.to_string())?;
|
||||
fix_viewport_status_flags(&mut doc);
|
||||
fix_current_style_names(&mut doc);
|
||||
crate::entities::field::local_header_dates(&mut doc);
|
||||
crate::entities::field::local_header_dates(&mut doc);
|
||||
Ok(doc)
|
||||
}
|
||||
"dxf" => {
|
||||
@@ -777,7 +777,7 @@ pub fn load_bytes(name: &str, bytes: Vec<u8>) -> Result<CadDocument, String> {
|
||||
fix_dxf_layout_plot_settings(&mut doc);
|
||||
fix_viewport_status_flags(&mut doc);
|
||||
fix_current_style_names(&mut doc);
|
||||
crate::entities::field::local_header_dates(&mut doc);
|
||||
crate::entities::field::local_header_dates(&mut doc);
|
||||
Ok(doc)
|
||||
}
|
||||
_ => Err(format!("Unsupported file format: .{ext}")),
|
||||
|
||||
Reference in new issue
Block a user