File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed
Nodify/Interactivity/Gestures Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 44
55> - Breaking Changes:
66> - Features:
7+ > - Added AsRef extension method to InputGesture to convert it to an InputGestureRef
78> - Bugfixes:
9+ > - Fixed an issue where the gesture used for EditorGestures.Editor.SelectAll extracted from the ApplicationCommands was assumed to be a KeyGesture
810
911#### ** Version 7.0.3**
1012
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ public class NodifyEditorGestures
150150 public NodifyEditorGestures ( )
151151 {
152152 Selection = new SelectionGestures ( ) ;
153- SelectAll = ( KeyGesture ) ApplicationCommands . SelectAll . InputGestures [ 0 ] ;
153+ SelectAll = ApplicationCommands . SelectAll . InputGestures [ 0 ] . AsRef ( ) ;
154154 Cutting = new MouseGesture ( MouseAction . LeftClick , ModifierKeys . Alt | ModifierKeys . Shift , true ) ;
155155 PushItems = new MouseGesture ( MouseAction . LeftClick , ModifierKeys . Control | ModifierKeys . Shift , true ) ;
156156 Pan = new AnyGesture ( new MouseGesture ( MouseAction . RightClick ) , new MouseGesture ( MouseAction . MiddleClick ) ) ;
Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ public sealed class InputGestureRef : InputGesture
1313
1414 private InputGestureRef ( ) { }
1515
16+ internal InputGestureRef ( InputGesture gesture )
17+ {
18+ Value = gesture ;
19+ }
20+
1621 public override bool Matches ( object targetElement , InputEventArgs inputEventArgs )
1722 {
1823 return Value . Matches ( targetElement , inputEventArgs ) ;
@@ -36,4 +41,18 @@ public static implicit operator InputGestureRef(MultiGesture gesture)
3641 public void Unbind ( )
3742 => Value = MultiGesture . None ;
3843 }
44+
45+ /// <summary>
46+ /// Extension methods for the <see cref="InputGestureRef"/> class.
47+ /// </summary>
48+ public static class InputGestureRefExtensions
49+ {
50+ /// <summary>
51+ /// Creates a new <see cref="InputGestureRef"/> from the specified gesture.
52+ /// </summary>
53+ public static InputGestureRef AsRef ( this InputGesture gesture )
54+ {
55+ return new InputGestureRef ( gesture ) ;
56+ }
57+ }
3958}
You can’t perform that action at this time.
0 commit comments