mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 01:28:12 +08:00
Auto-select new layer created by Pen Tool. (#235)
Signed-off-by: kastenbutt <hello@jonasklein.dev>
This commit is contained in:
committed by
Keavon Chambers
parent
2ce6ca0935
commit
877c2c0e4e
@@ -203,8 +203,9 @@ impl Document {
|
|||||||
} => {
|
} => {
|
||||||
let points: Vec<glam::DVec2> = points.iter().map(|&it| it.into()).collect();
|
let points: Vec<glam::DVec2> = points.iter().map(|&it| it.into()).collect();
|
||||||
let polyline = PolyLine::new(points);
|
let polyline = PolyLine::new(points);
|
||||||
self.add_layer(&path, Layer::new(LayerDataTypes::PolyLine(polyline), *transform, *style), *insert_index)?;
|
let id = self.add_layer(&path, Layer::new(LayerDataTypes::PolyLine(polyline), *transform, *style), *insert_index)?;
|
||||||
Some(vec![DocumentResponse::DocumentChanged])
|
let path = [path.clone(), vec![id]].concat();
|
||||||
|
Some(vec![DocumentResponse::DocumentChanged, DocumentResponse::SelectLayer { path }])
|
||||||
}
|
}
|
||||||
Operation::AddShape {
|
Operation::AddShape {
|
||||||
path,
|
path,
|
||||||
|
|||||||
Reference in New Issue
Block a user