Selecting an individual anchor point deselects each of the other points (#963)

* Selecting an individual anchor point deselects each of the other points

* git gra

* Selecting intersecting shapes,selects top shape

* Merge commit

* cargo fmt

* fixed: can't drag multiple selected shapes.

* Merge commit

* Merge commit

* Code review tweaks

* Merge commit

* Fixed topmost layer and previous_mouse_position

* Fixed issues when clicking on anchors

* Works

* Function name change

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
This commit is contained in:
Christopher Mendoza
2023-02-19 23:26:02 -08:00
committed by Keavon Chambers
co-authored by Keavon Chambers Dennis Kobert
parent 964cf6df15
commit b7f2163998
5 changed files with 57 additions and 13 deletions
+7
View File
@@ -1062,6 +1062,13 @@ impl Document {
}
Some(vec![LayerChanged { path: layer_path.clone() }])
}
Operation::SelectAllAnchors { layer_path } => {
let layer = self.layer_mut(&layer_path)?;
if let Some(subpath) = layer.as_subpath_mut() {
subpath.select_all_anchors();
}
Some(vec![LayerChanged { path: layer_path.clone() }])
}
Operation::DeselectAllManipulatorPoints { layer_path } => {
let layer = self.layer_mut(&layer_path)?;
if let Some(shape) = layer.as_subpath_mut() {
+3
View File
@@ -125,6 +125,9 @@ pub enum Operation {
DeselectAllManipulatorPoints {
layer_path: Vec<LayerId>,
},
SelectAllAnchors {
layer_path: Vec<LayerId>,
},
DuplicateLayer {
path: Vec<LayerId>,
},