Skip to content

Commit 192f314

Browse files
bakayuKeavon
authored andcommitted
Revert "added functionality for alt key"
This reverts commit f12ba6f.
1 parent 19ee868 commit 192f314

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

editor/src/messages/tool/tool_messages/path_tool.rs

-26
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,6 @@ struct PathToolData {
287287
drag_start_pos: DVec2,
288288
previous_mouse_position: DVec2,
289289
toggle_colinear_debounce: bool,
290-
equidistant_colinear_debounce: bool,
291-
original_handle_colinear: bool,
292290
opposing_handle_lengths: Option<OpposingHandleLengths>,
293291
/// Describes information about the selected point(s), if any, across one or multiple shapes and manipulator point types (anchor or handle).
294292
/// The available information varies depending on whether `None`, `One`, or `Multiple` points are currently selected.
@@ -473,28 +471,6 @@ impl PathToolData {
473471
false
474472
}
475473

476-
/// Temporarily converts selected handles to colinear if they are not already colinear.
477-
fn update_equidistant_handle_collinearity(&mut self, equidistant: bool, shape_editor: &mut ShapeState, document: &DocumentMessageHandler, responses: &mut VecDeque<Message>) {
478-
match (equidistant, self.equidistant_colinear_debounce) {
479-
(true, false) => {
480-
let current_angle = shape_editor.selected_manipulator_angles(&document.network_interface);
481-
self.original_handle_colinear = current_angle == ManipulatorAngle::Colinear;
482-
483-
if !self.original_handle_colinear {
484-
shape_editor.convert_selected_manipulators_to_colinear_handles(responses, document);
485-
}
486-
self.equidistant_colinear_debounce = true;
487-
}
488-
(false, true) => {
489-
if !self.original_handle_colinear {
490-
shape_editor.disable_colinear_handles_state_on_selected(&document.network_interface, responses);
491-
}
492-
self.equidistant_colinear_debounce = false;
493-
}
494-
_ => {}
495-
}
496-
}
497-
498474
/// Attempts to get a single selected handle. Also retrieves the position of the anchor it is connected to. Used for the purpose of snapping the angle.
499475
fn try_get_selected_handle_and_anchor(&self, shape_editor: &ShapeState, document: &DocumentMessageHandler) -> Option<(DVec2, DVec2)> {
500476
let (layer, selection) = shape_editor.selected_shape_state.iter().next()?; // Only count selections of a single layer
@@ -591,8 +567,6 @@ impl PathToolData {
591567
shape_editor.snap(&mut self.snap_manager, &self.snap_cache, document, input, previous_mouse)
592568
};
593569

594-
self.update_equidistant_handle_collinearity(equidistant, shape_editor, document, responses);
595-
596570
let handle_lengths = if equidistant { None } else { self.opposing_handle_lengths.take() };
597571
shape_editor.move_selected_points(handle_lengths, document, snapped_delta, equidistant, responses, true);
598572
self.previous_mouse_position += document_to_viewport.inverse().transform_vector2(snapped_delta);

0 commit comments

Comments
 (0)