mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-04 13:30:48 +00:00
Fix Gradient tool always re-selecting its end point after any click/drag (#2472)
fix gradient tool incorrectly selecting end point on pointer up Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
parent
56fafa942a
commit
3c425d9a71
1 changed files with 7 additions and 4 deletions
|
@ -476,12 +476,15 @@ impl Fsm for GradientToolFsmState {
|
|||
(GradientToolFsmState::Drawing, GradientToolMessage::PointerUp) => {
|
||||
input.mouse.finish_transaction(tool_data.drag_start, responses);
|
||||
tool_data.snap_manager.cleanup(responses);
|
||||
if let Some(selected_layer) = document.click(input) {
|
||||
if let Some(gradient) = get_gradient(selected_layer, &document.network_interface) {
|
||||
tool_data.selected_gradient = Some(SelectedGradient::new(gradient, selected_layer, document));
|
||||
let was_dragging = tool_data.selected_gradient.is_some();
|
||||
|
||||
if !was_dragging {
|
||||
if let Some(selected_layer) = document.click(input) {
|
||||
if let Some(gradient) = get_gradient(selected_layer, &document.network_interface) {
|
||||
tool_data.selected_gradient = Some(SelectedGradient::new(gradient, selected_layer, document));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GradientToolFsmState::Ready
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue