mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-25 20:14:31 +01:00
Tool rail: remembered tools keyed by the scope id (egui's renamed Ui::id)
This commit is contained in:
1 parent
e80eacc2ab
commit
ac234e6e4b
1 file changed
+1
-1
@@ -317,7 +317,7 @@ impl<'a, T: Value + MemoProps + PlainData + 'static> ToolRail<'a, T> {
|
||||
// The last-used tools after this pass: derived while the slots, the remembered and hidden tools and the current tool are as they were.
|
||||
let key = (draw.slots.revision(), draw.last_used.revision(), draw.hidden.map(Tracked::revision), draw.current);
|
||||
let last =
|
||||
crate::runtime::derived::derived(ui.ctx(), ui.id().with("remembered"), &key, || remembered(draw.slots, draw.current, draw.last_used));
|
||||
crate::runtime::derived::derived(ui.ctx(), ui.scope_id().with("remembered"), &key, || remembered(draw.slots, draw.current, draw.last_used));
|
||||
let last = last.as_ref().clone();
|
||||
let (mut events, mut edit_toolbar) = (Vec::new(), None);
|
||||
let shown = self.show(ui, |ui, _| edit_toolbar = draw.run(ui, &mut events));
|
||||
|
||||
Reference in new issue
Block a user