mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-05 00:38: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:
+3
-3
@@ -80,13 +80,13 @@ impl LayoutHolder for NewDocumentDialogMessageHandler {
|
||||
.widget_holder(),
|
||||
];
|
||||
|
||||
let mut checkbox_id = CheckboxId::default();
|
||||
let checkbox_id = CheckboxId::new();
|
||||
let infinite = vec![
|
||||
TextLabel::new("Infinite Canvas").table_align(true).min_width(90).for_checkbox(&mut checkbox_id).widget_holder(),
|
||||
TextLabel::new("Infinite Canvas").table_align(true).min_width(90).for_checkbox(checkbox_id).widget_holder(),
|
||||
Separator::new(SeparatorType::Unrelated).widget_holder(),
|
||||
CheckboxInput::new(self.infinite)
|
||||
.on_update(|checkbox_input: &CheckboxInput| NewDocumentDialogMessage::Infinite(checkbox_input.checked).into())
|
||||
.for_label(checkbox_id.clone())
|
||||
.for_label(checkbox_id)
|
||||
.widget_holder(),
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user