mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Free Transform: take the press marker's id before locking egui's data
This commit is contained in:
1 parent
f61800a518
commit
758b3abfc3
1 file changed
+3
-1
@@ -1492,7 +1492,9 @@ fn transform_press_release(
|
||||
}
|
||||
}
|
||||
if app.ui.transform.is_none() || !ui.input(|i| i.pointer.primary_down()) {
|
||||
ctx.data_mut(|m| m.remove::<bool>(transform_press_id(ctx)));
|
||||
// The id first: reading the viewport inside `data_mut` would wait on its own lock.
|
||||
let id = transform_press_id(ctx);
|
||||
ctx.data_mut(|m| m.remove::<bool>(id));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user