feat(properties): audit editable vs read-only across all entities
Reclassify every property row to match standard palette behaviour: a row is editable only when its value maps directly to a stored field AND its apply_geom_prop handler is wired; computed/derived/count/handle/ cross-object values stay read-only. Newly editable (all apply-wired): attribute tag/prompt; ellipse major radius; hatch Double; lwpolyline closed/linetype-gen; mline style; multileader annotative/landing/background-fill; polyline 2D+3D vertex coords/segment widths/linetype-gen; shape style; spline control/fit point coords, weight, fit tolerance, tangents; table break-option flags; text alignment point, upside-down, backward; underlay display flags. Corrections: spline Degree -> read-only (editing desynced the knot vector); removed a duplicate leader "Arrowhead" row. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
35468004e6
commit
4d2471cafd
13 changed files with 464 additions and 143 deletions
|
|
@ -543,10 +543,10 @@ fn properties(ml: &MultiLeader) -> Vec<PropSection> {
|
|||
&["None", "MText", "Block", "Tolerance"],
|
||||
),
|
||||
edit("Overall scale", "scale_factor", ml.scale_factor),
|
||||
ro(
|
||||
bool_toggle(
|
||||
"Annotative",
|
||||
"enable_annotation_scale",
|
||||
if ml.enable_annotation_scale { "Yes" } else { "No" },
|
||||
ml.enable_annotation_scale,
|
||||
),
|
||||
// No stored annotative-scale name on the entity.
|
||||
ro("Annotative scale", "annotative_scale", String::new()),
|
||||
|
|
@ -588,11 +588,7 @@ fn properties(ml: &MultiLeader) -> Vec<PropSection> {
|
|||
ro("Maximum leader points", "max_leader_points", String::new()),
|
||||
ro("First segment angle", "first_segment_angle", String::new()),
|
||||
ro("Second segment angle", "second_segment_angle", String::new()),
|
||||
ro(
|
||||
"Landing",
|
||||
"enable_landing",
|
||||
if ml.enable_landing { "Yes" } else { "No" },
|
||||
),
|
||||
bool_toggle("Landing", "enable_landing", ml.enable_landing),
|
||||
edit(
|
||||
"Landing distance",
|
||||
"landing_distance",
|
||||
|
|
@ -652,14 +648,10 @@ fn properties(ml: &MultiLeader) -> Vec<PropSection> {
|
|||
format!("{:?}", ml.text_attachment_direction),
|
||||
),
|
||||
edit("Landing gap", "landing_gap", ctx.landing_gap),
|
||||
ro(
|
||||
bool_toggle(
|
||||
"Background mask",
|
||||
"background_fill_enabled",
|
||||
if ctx.background_fill_enabled {
|
||||
"Yes"
|
||||
} else {
|
||||
"No"
|
||||
},
|
||||
ctx.background_fill_enabled,
|
||||
),
|
||||
],
|
||||
};
|
||||
|
|
@ -771,6 +763,13 @@ fn apply_geom_prop(ml: &mut MultiLeader, field: &str, value: &str) {
|
|||
value == "true"
|
||||
}
|
||||
}
|
||||
"background_fill_enabled" => {
|
||||
ml.context.background_fill_enabled = if value == "toggle" {
|
||||
!ml.context.background_fill_enabled
|
||||
} else {
|
||||
value == "true"
|
||||
}
|
||||
}
|
||||
"dogleg_length" => {
|
||||
if let Some(v) = f64(value) {
|
||||
ml.dogleg_length = v;
|
||||
|
|
|
|||
Loading…
Reference in a new issue