Skip to content

Commit

Permalink
Fix ghost anchors by preventing state jumps
Browse files Browse the repository at this point in the history
  • Loading branch information
mTvare6 committed Jan 12, 2025
1 parent 3582126 commit 586c027
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions editor/src/messages/tool/tool_messages/pen_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,9 +782,8 @@ impl Fsm for PenToolFsmState {
}
(_, PenToolMessage::Redo) => {
tool_data.point_index = (tool_data.point_index + 1).min(tool_data.latest_points.len().saturating_sub(1));
tool_data
.place_anchor(SnapData::new(document, input), transform, input.mouse.position, responses)
.unwrap_or(PenToolFsmState::PlacingAnchor)
tool_data.place_anchor(SnapData::new(document, input), transform, input.mouse.position, responses);
PenToolFsmState::Ready
}
_ => self,
}
Expand Down

0 comments on commit 586c027

Please sign in to comment.