forked from 1b-agent/opencadstudio-upstream
Merge pull request #1415 from ramox81/codex/aligned-constraint-parity
Aligned dimensional constraint: Point & line, 2Lines, value and property parity # Conflicts: # src/app/command_driver.rs # src/app/update/viewport.rs # src/entities/dimension.rs # src/scene/parametric_constraints.rs
This commit is contained in:
commit
7490b2bebd
12 files changed
+1292
-167
No files matched your search
@@ -2188,6 +2188,9 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task<Message> {
|
||||
field: &'static str,
|
||||
value: String,
|
||||
) -> Task<Message> {
|
||||
if matches!(field, "dyn_constraint_form" | "dyn_constraint_reference") {
|
||||
return self.on_dynamic_dimension_choice(field, &value);
|
||||
}
|
||||
let i = self.active_tab;
|
||||
let handles = self.property_target_handles(i);
|
||||
|
||||
@@ -3259,6 +3262,19 @@ pub(super) fn on_tab_close(&mut self, idx: usize) -> Task<Message> {
|
||||
}
|
||||
|
||||
pub(super) fn on_prop_geom_commit(&mut self, field: &'static str) -> Task<Message> {
|
||||
use crate::ui::window::named_parameters::ParamField;
|
||||
// A dynamic dimension's Name/Expression rows edit its parameter.
|
||||
let dynamic_field = match field {
|
||||
"dyn_constraint_name" => Some(ParamField::Name),
|
||||
"dyn_constraint_expression" => Some(ParamField::Formula),
|
||||
_ => None,
|
||||
};
|
||||
if let Some(param_field) = dynamic_field {
|
||||
return self.on_dynamic_dimension_field_commit(field, param_field);
|
||||
}
|
||||
if field == "dyn_constraint_description" {
|
||||
return self.on_dynamic_dimension_description_commit(field);
|
||||
}
|
||||
let i = self.active_tab;
|
||||
self.tabs[i].properties.active_field = None;
|
||||
let handles = self.property_target_handles(i);
|
||||
|
||||
Reference in new issue
Block a user