Free Transform: take the press marker's id before locking egui's data

This commit is contained in:
tjbbjt committed 2026-11-11 12:27:20 -08:00
1 parent f61800a518
commit 758b3abfc3
1 file changed
+3 -1
+3 -1
View File
@@ -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));
}
}