Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions editor/src/messages/tool/tool_messages/path_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2636,6 +2636,7 @@ impl Fsm for PathToolFsmState {
responses.add(PathToolMessage::SelectedPointUpdated);
tool_data.snap_manager.cleanup(responses);
tool_data.opposite_handle_position = None;
tool_data.molding_segment = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While you're resetting state here, it would be more robust to also reset molding_info. It's possible for molding_info to be set in mouse_down without tool_data.segment being set. In that scenario, on DragStop, the if let Some(segment) = ... block that resets molding_info would be skipped, leaving it in a stale state for the next operation. Resetting it here ensures all molding-related state is cleared.

Suggested change
tool_data.molding_segment = false;
tool_data.molding_segment = false;
tool_data.molding_info = None;


PathToolFsmState::Ready
}
Expand Down
Loading