-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add ShortcutKeysEditor tests and fix some bugs #1297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
RussKie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please clarify what the bug was?
src/System.Windows.Forms.Design.Editors/src/System/Windows/Forms/Design/ShortcutKeysEditor.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms.Design.Editors/src/System/Windows/Forms/Design/ShortcutKeysEditor.cs
Show resolved
Hide resolved
| IWindowsFormsEditorService edSvc = | ||
| (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); | ||
| if (edSvc != null) | ||
| if (provider.GetService(typeof(IWindowsFormsEditorService)) is IWindowsFormsEditorService edSvc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| get | ||
| { | ||
| if (((Keys)currentValue & Keys.KeyCode) == 0) | ||
| if (currentValue is Keys currentKeys && (currentKeys & Keys.KeyCode) == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| originalValue = currentValue = value; | ||
|
|
||
| Keys keys = (Keys)value; | ||
| Keys keys = value is Keys ? (Keys)value : Keys.None; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you called |
Fixes #1296
Contributes to #817