From 9f21a8ae6b3cff59d643a276aca1ae0e0c50dac1 Mon Sep 17 00:00:00 2001 From: 0HyperCube <78500760+0HyperCube@users.noreply.github.com> Date: Sun, 28 Aug 2022 01:38:45 +0100 Subject: [PATCH] Stop dragging after deselecting point with Shift key (#764) Stop dragging after deselecting point with shift Co-authored-by: Keavon Chambers --- .../messages/tool/common_functionality/shape_editor.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/editor/src/messages/tool/common_functionality/shape_editor.rs b/editor/src/messages/tool/common_functionality/shape_editor.rs index 99531ba5..93be3086 100644 --- a/editor/src/messages/tool/common_functionality/shape_editor.rs +++ b/editor/src/messages/tool/common_functionality/shape_editor.rs @@ -102,6 +102,8 @@ impl ShapeEditor { if let Ok(viewspace) = document.generate_transform_relative_to_viewport(shape_layer_path) { self.move_selected_points(mouse_position - viewspace.transform_point2(point_position), mouse_position, responses) } + + return Some(points); } else { responses.push_back( Operation::DeselectManipulatorPoints { @@ -110,10 +112,10 @@ impl ShapeEditor { } .into(), ); - points.retain(|x| *x != (shape_layer_path, manipulator_group_id, ManipulatorType::from_index(manipulator_point_index))) - } + points.retain(|x| *x != (shape_layer_path, manipulator_group_id, ManipulatorType::from_index(manipulator_point_index))); - return Some(points); + return None; + } } // Deselect all points if no nearby point