From 586c0273ab4d62570c1064d85190abb975ced8ad Mon Sep 17 00:00:00 2001 From: mtvare6 <mtvare6@proton.me> Date: Sun, 12 Jan 2025 18:23:27 +0530 Subject: [PATCH] Fix ghost anchors by preventing state jumps Fixes https://discord.com/channels/731730685944922173/881073965047636018/1267365764231598186 --- editor/src/messages/tool/tool_messages/pen_tool.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/editor/src/messages/tool/tool_messages/pen_tool.rs b/editor/src/messages/tool/tool_messages/pen_tool.rs index 356200de3c..55565bc817 100644 --- a/editor/src/messages/tool/tool_messages/pen_tool.rs +++ b/editor/src/messages/tool/tool_messages/pen_tool.rs @@ -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, }