File tree 1 file changed +26
-2
lines changed
editor/src/messages/tool/tool_messages
1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -1008,7 +1008,15 @@ impl Fsm for PenToolFsmState {
1008
1008
1009
1009
PenToolFsmState :: SplineDrawing
1010
1010
}
1011
- ( PenToolFsmState :: SplineDrawing , PenToolMessage :: PointerMove { .. } ) => {
1011
+ (
1012
+ PenToolFsmState :: SplineDrawing ,
1013
+ PenToolMessage :: PointerMove {
1014
+ snap_angle,
1015
+ break_handle,
1016
+ lock_angle,
1017
+ colinear,
1018
+ } ,
1019
+ ) => {
1012
1020
let tool_data = & mut tool_data. spline_mode_tool_data ;
1013
1021
let Some ( layer) = tool_data. current_layer else { return PenToolFsmState :: Ready } ;
1014
1022
let ignore = |cp : PointId | tool_data. preview_point . is_some_and ( |pp| pp == cp) || tool_data. points . last ( ) . is_some_and ( |( ep, _) | * ep == cp) ;
@@ -1027,12 +1035,28 @@ impl Fsm for PenToolFsmState {
1027
1035
extend_spline ( tool_data, true , responses) ;
1028
1036
1029
1037
// Auto-panning
1030
- let messages = [ SplineToolMessage :: PointerOutsideViewport . into ( ) , SplineToolMessage :: PointerMove . into ( ) ] ;
1038
+ let messages = [
1039
+ PenToolMessage :: PointerOutsideViewport {
1040
+ snap_angle,
1041
+ break_handle,
1042
+ lock_angle,
1043
+ colinear,
1044
+ }
1045
+ . into ( ) ,
1046
+ PenToolMessage :: PointerMove {
1047
+ snap_angle,
1048
+ break_handle,
1049
+ lock_angle,
1050
+ colinear,
1051
+ }
1052
+ . into ( ) ,
1053
+ ] ;
1031
1054
tool_data. auto_panning . setup_by_mouse_position ( input, & messages, responses) ;
1032
1055
1033
1056
PenToolFsmState :: SplineDrawing
1034
1057
}
1035
1058
( PenToolFsmState :: SplineDrawing , PenToolMessage :: PointerOutsideViewport { .. } ) => {
1059
+ let tool_data = & mut tool_data. spline_mode_tool_data ;
1036
1060
// Auto-panning
1037
1061
let _ = tool_data. auto_panning . shift_viewport ( input, responses) ;
1038
1062
You can’t perform that action at this time.
0 commit comments