mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-17 05:14:24 +00:00
panels-w3: compile fix (the mode field's body runs per pass: clone the current mode)
This commit is contained in:
@@ -401,7 +401,7 @@ impl<M: Value> Pass<'_, M> {
|
||||
let current = self.values.mode.clone();
|
||||
let mut pick = None;
|
||||
Field::new(caption.clone()).id_salt("mode").sizing(Sizing::Content).show(ui, |ui, _| {
|
||||
pick = Select::new(caption.clone(), Bind::given(current), entries).show(ui).value().cloned();
|
||||
pick = Select::new(caption.clone(), Bind::given(current.clone()), entries).show(ui).value().cloned();
|
||||
});
|
||||
if let Some(mode) = pick {
|
||||
self.set_with(caption, |v| v.mode = mode);
|
||||
|
||||
Reference in New Issue
Block a user