forked from 1b-agent/opencadstudio-upstream
fix(mleader): repair creation and editing
This commit is contained in:
commit
ff1f873633
40 files changed
+4504
-1754
No files matched your search
@@ -766,6 +766,9 @@ impl PropertiesPanel {
|
||||
PropValue::FieldLwChoice { field, value } => {
|
||||
self.render_field_lw_row(label, field, *value)
|
||||
}
|
||||
PropValue::FieldLwVaries { field } => {
|
||||
self.render_field_lw_varies_row(label, field)
|
||||
}
|
||||
PropValue::LwVaries => self.render_lw_varies_row(label),
|
||||
PropValue::LinetypeChoice(lt) => self.render_linetype_row(label, lt),
|
||||
PropValue::Choice { selected, options } => {
|
||||
@@ -1058,6 +1061,34 @@ impl PropertiesPanel {
|
||||
prop_row_widget(label, combo.into())
|
||||
}
|
||||
|
||||
fn render_field_lw_varies_row<'a>(
|
||||
&'a self,
|
||||
label: &'a str,
|
||||
field: &'static str,
|
||||
) -> Element<'a, Message> {
|
||||
let combo = combo_box(
|
||||
&self.lineweight_combo,
|
||||
VARIES_LABEL,
|
||||
None,
|
||||
move |item: LwItem| Message::PropFieldLwChanged {
|
||||
field,
|
||||
value: item.0,
|
||||
},
|
||||
)
|
||||
.size(FONT_SZ)
|
||||
.padding(Padding {
|
||||
top: COMBO_PAD_V,
|
||||
bottom: COMBO_PAD_V,
|
||||
left: 6.0,
|
||||
right: 6.0,
|
||||
})
|
||||
.input_style(combo_input_style)
|
||||
.on_open(Message::PropColorPickerClose)
|
||||
.width(Length::Fill);
|
||||
|
||||
prop_row_widget(label, combo.into())
|
||||
}
|
||||
|
||||
// ── Linetype row (combo_box) ──────────────────────────────────────────
|
||||
|
||||
fn render_linetype_row<'a>(&'a self, label: &'a str, current: &'a str) -> Element<'a, Message> {
|
||||
|
||||
Reference in new issue
Block a user