File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1666,7 +1666,7 @@ void SetInitialProperties ()
1666
1666
AddCommand ( Command . Undo , ( ) => { Undo ( ) ; return true ; } ) ;
1667
1667
AddCommand ( Command . Redo , ( ) => { Redo ( ) ; return true ; } ) ;
1668
1668
AddCommand ( Command . DeleteAll , ( ) => { DeleteAll ( ) ; return true ; } ) ;
1669
- AddCommand ( Command . Accept , ( ) => {
1669
+ AddCommand ( Command . ShowContextMenu , ( ) => {
1670
1670
ContextMenu ! . Position = new Point ( CursorPosition . X - _leftColumn + 2 , CursorPosition . Y - _topRow + 2 ) ;
1671
1671
ShowContextMenu ( ) ;
1672
1672
return true ;
@@ -1775,7 +1775,7 @@ void SetInitialProperties ()
1775
1775
ContextMenu = new ContextMenu ( ) { MenuItems = BuildContextMenuBarItem ( ) } ;
1776
1776
ContextMenu . KeyChanged += ContextMenu_KeyChanged ! ;
1777
1777
1778
- KeyBindings . Add ( ( KeyCode ) ContextMenu . Key , KeyBindingScope . HotKey , Command . Accept ) ;
1778
+ KeyBindings . Add ( ( KeyCode ) ContextMenu . Key , KeyBindingScope . HotKey , Command . ShowContextMenu ) ;
1779
1779
}
1780
1780
1781
1781
private MenuBarItem BuildContextMenuBarItem ( )
Original file line number Diff line number Diff line change @@ -3047,6 +3047,10 @@ public void KeyBindings_Command ()
3047
3047
Assert . False ( tv . NewKeyDownEvent ( Application . AlternateForwardKey ) ) ;
3048
3048
Assert . False ( tv . NewKeyDownEvent ( new ( KeyCode . Tab | KeyCode . CtrlMask | KeyCode . ShiftMask ) ) ) ;
3049
3049
Assert . False ( tv . NewKeyDownEvent ( Application . AlternateBackwardKey ) ) ;
3050
+
3051
+ Assert . True ( tv . NewKeyDownEvent ( ContextMenu . DefaultKey ) ) ;
3052
+ Assert . True ( tv . ContextMenu != null && tv . ContextMenu . MenuBar . Visible ) ;
3053
+
3050
3054
}
3051
3055
3052
3056
[ Fact ]
You can’t perform that action at this time.
0 commit comments