Skip to content

Commit 4e6f773

Browse files
committed
Fix editor crash when selecting other layers with path tool and anchors disabled
1 parent fb523b5 commit 4e6f773

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

editor/src/messages/tool/common_functionality/shape_editor.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ impl SelectedLayerState {
7171
pub fn set_anchors_status(&mut self, ignore: bool) {
7272
self.ignore_anchors = ignore;
7373
}
74+
pub fn clear_points_force(&mut self) {
75+
self.selected_points.clear();
76+
self.ignore_handles = false;
77+
self.ignore_anchors = false;
78+
}
7479
pub fn clear_points(&mut self) {
7580
if self.ignore_handles || self.ignore_anchors {
7681
return;
@@ -1517,7 +1522,7 @@ impl ShapeState {
15171522
pub fn select_all_in_shape(&mut self, network_interface: &NodeNetworkInterface, selection_shape: SelectionShape, selection_change: SelectionChange) {
15181523
for (&layer, state) in &mut self.selected_shape_state {
15191524
if selection_change == SelectionChange::Clear {
1520-
state.clear_points()
1525+
state.clear_points_force()
15211526
}
15221527

15231528
let vector_data = network_interface.compute_modified_vector(layer);

0 commit comments

Comments
 (0)