Skip to content

Commit e8069ab

Browse files
committed
Cranky fix
1 parent 9565e53 commit e8069ab

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

crates/transform-gizmo/src/gizmo.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,17 @@ impl Gizmo {
132132

133133
// If there is no active subgizmo, find which one of them
134134
// is under the mouse pointer, if any.
135-
if self.active_subgizmo_id.is_none() && interaction.hovered {
136-
if let Some(subgizmo) = self.pick_subgizmo(pointer_ray) {
137-
subgizmo.set_focused(true);
138-
139-
// If we started dragging from one of the subgizmos, mark it as active.
140-
if interaction.drag_started || force_active {
141-
self.active_subgizmo_id = Some(subgizmo.id());
142-
self.target_start_transforms = targets.to_vec();
143-
self.gizmo_start_transform = self.config.as_transform();
144-
}
135+
if self.active_subgizmo_id.is_none()
136+
&& interaction.hovered
137+
&& let Some(subgizmo) = self.pick_subgizmo(pointer_ray)
138+
{
139+
subgizmo.set_focused(true);
140+
141+
// If we started dragging from one of the subgizmos, mark it as active.
142+
if interaction.drag_started || force_active {
143+
self.active_subgizmo_id = Some(subgizmo.id());
144+
self.target_start_transforms = targets.to_vec();
145+
self.gizmo_start_transform = self.config.as_transform();
145146
}
146147
}
147148

0 commit comments

Comments
 (0)