Add Alt-dragging to duplicate layers (#762)

* Add alt drag to duplicate

* Allow duplicating whilst dragging

* Remove unused variable

* Clearer names for functions

* Better renaming of functions

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0HyperCube
2022-08-28 21:33:21 +01:00
committed by GitHub
parent 7ca45c25e1
commit a6bdabcbaa
2 changed files with 100 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ pub fn default_mapping() -> Mapping {
entry!(PointerMove; refresh_keys=[Shift, Control], action_dispatch=TransformLayerMessage::PointerMove { slow_key: Shift, snap_key: Control }),
//
// SelectToolMessage
entry!(PointerMove; refresh_keys=[Control, Shift, Alt], action_dispatch=SelectToolMessage::PointerMove { axis_align: Shift, snap_angle: Control, center: Alt }),
entry!(PointerMove; refresh_keys=[Control, Shift, Alt], action_dispatch=SelectToolMessage::PointerMove { axis_align: Shift, snap_angle: Control, center: Alt, duplicate: Alt }),
entry!(KeyDown(Lmb); action_dispatch=SelectToolMessage::DragStart { add_to_selection: Shift }),
entry!(KeyUp(Lmb); action_dispatch=SelectToolMessage::DragStop),
entry!(KeyDown(Enter); action_dispatch=SelectToolMessage::DragStop),