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:
parent
50f06c886f
commit
75ad8d4abd
|
|
@ -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);
|
responses.add(TransformLayerMessage::CancelTransformOperation);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue