Skip to content

Commit

Permalink
fix: better names/comment(hopefull)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaraghD authored and Keavon committed Oct 26, 2024
1 parent 0b8d867 commit 700b323
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions editor/src/messages/tool/common_functionality/shape_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1072,17 +1072,17 @@ impl ShapeState {

for point in self.selected_points() {
if let Some(handles) = point.get_handle_pair(&vector_data) {
//handle[0] is selected, handle[1] is other
//handle[0] is selected, handle[1] is opposite / mirror handle
handles_to_update.push((layer, handles[0].to_manipulator_point(), handles[1].to_manipulator_point()));
}
}
}

for (layer, handle_to_deselect, handle_to_select) in handles_to_update {
if let Some(state) = self.selected_shape_state.get_mut(&layer) {
let set = &state.selected_points;
// If both selected, keep them selected
if set.contains(&handle_to_deselect) && set.contains(&handle_to_select) {
let points = &state.selected_points;
let both_selected = points.contains(&handle_to_deselect) && points.contains(&handle_to_select);
if both_selected {
continue;
}
state.deselect_point(handle_to_deselect);
Expand Down

0 comments on commit 700b323

Please sign in to comment.