Skip to content

Commit 75ad8d4

Browse files
0SlowPoke0Keavon
andauthored
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 <keavon@keavon.com>
1 parent 50f06c8 commit 75ad8d4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

editor/src/messages/tool/tool_message_handler.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ impl MessageHandler<ToolMessage, ToolMessageContext<'_>> for ToolMessageHandler
139139
}
140140
}
141141

142-
if matches!(old_tool, ToolType::Path | ToolType::Select) {
142+
// If a G/R/S transform is active while using Path, Select, Pen, or Shape,
143+
// and the user switches to a different tool, cancel the current transform
144+
// operation to avoid leaving it in an inconsistent state
145+
if matches!(old_tool, ToolType::Path | ToolType::Select | ToolType::Pen | ToolType::Shape) {
143146
responses.add(TransformLayerMessage::CancelTransformOperation);
144147
}
145148
};

0 commit comments

Comments
 (0)