mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 16:28:11 +08:00
Make checkboxes not use interior mutability (#2976)
* Make checkboxes not use interior mutability * Use copy instead of cloning * Fix --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -236,7 +236,7 @@ impl LayoutHolder for PathTool {
|
||||
})
|
||||
// TODO: Remove `unwrap_or_default` once checkboxes are capable of displaying a mixed state
|
||||
.unwrap_or_default();
|
||||
let mut checkbox_id = CheckboxId::default();
|
||||
let checkbox_id = CheckboxId::new();
|
||||
let colinear_handle_checkbox = CheckboxInput::new(colinear_handles_state)
|
||||
.disabled(!self.tool_data.can_toggle_colinearity)
|
||||
.on_update(|&CheckboxInput { checked, .. }| {
|
||||
@@ -247,12 +247,12 @@ impl LayoutHolder for PathTool {
|
||||
}
|
||||
})
|
||||
.tooltip(colinear_handles_tooltip)
|
||||
.for_label(checkbox_id.clone())
|
||||
.for_label(checkbox_id)
|
||||
.widget_holder();
|
||||
let colinear_handles_label = TextLabel::new("Colinear Handles")
|
||||
.disabled(!self.tool_data.can_toggle_colinearity)
|
||||
.tooltip(colinear_handles_tooltip)
|
||||
.for_checkbox(&mut checkbox_id)
|
||||
.for_checkbox(checkbox_id)
|
||||
.widget_holder();
|
||||
|
||||
let point_editing_mode = CheckboxInput::new(self.options.path_editing_mode.point_editing_mode)
|
||||
|
||||
Reference in New Issue
Block a user