From 75ad8d4abdb4624f382765e8da3a3a6cbc6358b8 Mon Sep 17 00:00:00 2001 From: 0SlowPoke0 <142654792+0SlowPoke0@users.noreply.github.com> Date: Fri, 12 Sep 2025 04:29:19 +0530 Subject: [PATCH] Fix a regression where G/R/S stayed active after switching from Pen or Shape tool (#3166) * Fix: cancel active G/R/S transform when switching from Pen or Shape tool * Fix typo --------- Co-authored-by: Keavon Chambers --- editor/src/messages/tool/tool_message_handler.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/editor/src/messages/tool/tool_message_handler.rs b/editor/src/messages/tool/tool_message_handler.rs index c3dc2784..3e4a7200 100644 --- a/editor/src/messages/tool/tool_message_handler.rs +++ b/editor/src/messages/tool/tool_message_handler.rs @@ -139,7 +139,10 @@ impl MessageHandler> for ToolMessageHandler } } - if matches!(old_tool, ToolType::Path | ToolType::Select) { + // If a G/R/S transform is active while using Path, Select, Pen, or Shape, + // and the user switches to a different tool, cancel the current transform + // operation to avoid leaving it in an inconsistent state + if matches!(old_tool, ToolType::Path | ToolType::Select | ToolType::Pen | ToolType::Shape) { responses.add(TransformLayerMessage::CancelTransformOperation); } };