Skip to content

Commit 7bdb29d

Browse files
committed
Code review
1 parent bc3538f commit 7bdb29d

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

editor/src/messages/tool/common_functionality/gizmos/gizmo_manager.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ impl GizmoManager {
271271
///
272272
/// If a gizmo is active (hovered or being manipulated), it returns the cursor icon associated with that gizmo;
273273
/// otherwise, returns `None` to indicate the default crosshair cursor should be used.
274-
275274
pub fn mouse_cursor_icon(&self) -> Option<MouseCursorIcon> {
276275
self.active_shape_handler.as_ref().and_then(|h| h.gizmo_cursor_icon())
277276
}

editor/src/messages/tool/tool_messages/shape_tool.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -464,12 +464,7 @@ impl Fsm for ShapeToolFsmState {
464464
}
465465
}
466466

467-
let mut cursor;
468-
469-
cursor = tool_data.transform_cage_mouse_icon(input);
470-
if let Some(gizmo_cursor_icon) = tool_data.gizmo_manager.mouse_cursor_icon() {
471-
cursor = gizmo_cursor_icon;
472-
}
467+
let cursor = tool_data.gizmo_manager.mouse_cursor_icon().unwrap_or_else(|| tool_data.transform_cage_mouse_icon(input));
473468

474469
tool_data.cursor = cursor;
475470
responses.add(FrontendMessage::UpdateMouseCursor { cursor });

0 commit comments

Comments
 (0)