Skip to content

LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust

KEY-TOGGLEZOOM: the Space hand follows egui 0.37's ids and the registry's Ui

helgehelge12328ad99d77132
diff --git a/crates/ui-egui/src/space_hand.rs b/crates/ui-egui/src/space_hand.rs
index a02f2ac84..3c5f36835 100644
--- a/crates/ui-egui/src/space_hand.rs
+++ b/crates/ui-egui/src/space_hand.rs
@@ -76,8 +76,8 @@ pub(crate) fn interact(app: &mut LightcraftApp, ui: &mut egui::Ui, canvas: Rect,
if app.space_hand.is_none() {
return;
}
- let resp = ui.interact(canvas, egui::Id::new("loupe-hand"), Sense::click_and_drag());
- crate::widgets::register(ui.ctx(), "loupe:hand", canvas);
+ let resp = ui.interact(canvas, egui::Id::unique("loupe-hand"), Sense::click_and_drag());
+ crate::widgets::register(ui, "loupe:hand", canvas);
let at = resp.interact_pointer_pos().or(resp.hover_pos());
let (pane, img) = match (before, at) {
(Some((pane, img)), Some(q)) if pane.contains(q) => (pane, img),