forked from 1b-agent/opencadstudio-upstream
review(#1627): one UPDATEFIELD, honest counts, safe field boxes, one-pass host redraw
- UPDATEFIELD stays the command main already had (Select objects, undo, locale strings); it now takes the PR's reach — a block reference's attributes and block definition, a table's cell texts — and reports the fields that really changed. The PR's second implementation and its duplicate registration are gone. - FIELDEVAL's range error goes through the locale catalog. - Field boxes: no slicing inside a character, one layout per multi-line attribute, and TEXT boxes scale about the annotative reference point like the glyphs do. Comment and indentation put back where they belong. - bump_text_hosts classifies every host in one pass over the drawing instead of scanning all layouts and blocks per host. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
711799371a
commit
af75cf42a8
6 files changed
+180
-169
No files matched your search
@@ -327,7 +327,13 @@ pub const BACKGROUND: [f32; 4] = [203.0 / 255.0, 203.0 / 255.0, 203.0 / 255.0, 1
|
||||
|
||||
/// Whether `entity` hosts a field: its extension dictionary has ACAD_FIELD.
|
||||
pub fn hosts_field(document: &CadDocument, entity: &codec::entities::EntityType) -> bool {
|
||||
let Some(xdict) = entity.common().xdictionary_handle else {
|
||||
common_hosts_field(document, entity.common())
|
||||
}
|
||||
|
||||
/// [`hosts_field`] for an entity known only by its common data, such as an
|
||||
/// attribute of a block reference.
|
||||
pub fn common_hosts_field(document: &CadDocument, common: &codec::entities::EntityCommon) -> bool {
|
||||
let Some(xdict) = common.xdictionary_handle else {
|
||||
return false;
|
||||
};
|
||||
matches!(
|
||||
|
||||
Reference in new issue
Block a user