-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Bug: CommandManager.OverwriteKeyBindings System.ArgumentException #15331
Comments
Yeah when user set the same key to different commands, this happens. I’ve ever seen this crash before once. before adding keybindings to dictionary, we can check if. |
Don't we already prevent duplicate key bindings? |
If user set via text editor, we cannot prevent beforehand. |
Oh, sorry. I didn't know this issue was urgent P.S. Sorry again, closed mistakenly |
@Josh65-2201 cloud you please mark as Ready again? I’m gonna work on. |
Done 👍 |
What approach is better? This is caused by editing the json wrongly.
|
I don't think we need to go that far A combination of approach two and three is best, we can display a prompt and ask if the user would like to reset the conflicting hotkeys or if they would like to manually edit the settings file themselves. |
In that case, I assume Files has to know if the json has been corrected, and close the dialog, as the load is done once on startup. Also, the load of the custom hot keys is performed before MainWindow.Content is set; this issue was a blocker when I tried to prompt a dialog notifying incorrect of json format. I believe we need to improve json parser classes but can't we just reset only it for now? It sounds like it's not a big deal to remove a single hotkey customization. |
If that's a blocker, we can go with option 2 and reset the conflicting key. |
Description
Steps To Reproduce
NA
Requirements
Files Version
v3.4
Windows Version
Windows 11
Log File
The text was updated successfully, but these errors were encountered: