mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 10:58:04 +08:00
Fix off by one subpath and unrelated crash (#1754)
* Fix off by one in subpath code * Fix crash with selected handles and anchor * Sort the correct way I have no idea why the origional code was so overly verbose but it has caused significant confusion and wasted effort
This commit is contained in:
@@ -982,10 +982,10 @@ impl ShapeState {
|
||||
continue;
|
||||
}
|
||||
|
||||
selected_points.sort_by(|&a, &b| match a > b {
|
||||
true => std::cmp::Ordering::Greater,
|
||||
false => std::cmp::Ordering::Less,
|
||||
});
|
||||
selected_points.sort();
|
||||
|
||||
// Required to remove duplicates when the handles and anchors are selected
|
||||
selected_points.dedup();
|
||||
|
||||
let mut last_manipulator_index = 0;
|
||||
let mut to_extend_with_last_group: Option<Vec<ManipulatorGroup<ManipulatorGroupId>>> = None;
|
||||
|
||||
Reference in New Issue
Block a user