mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
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>
This commit is contained in:
@@ -139,7 +139,10 @@ impl MessageHandler<ToolMessage, ToolMessageContext<'_>> 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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user