-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Add IDs to Commands #16904
Add IDs to Commands #16904
Changes from all commits
90627b3
9dff28f
8bcbd0b
052d063
8cc82de
642d0ab
66fe08f
2bb1b6c
be193b2
db528c9
7c907fe
b43191d
2093660
6c32539
eccd87f
44510dc
10d1fc8
71bf90f
d57c7a1
5c2307c
9fc6972
dca7df5
dd25ed7
6e293a5
af2d22f
bdf42c2
12f3aa9
aa49212
5ee630e
360b92e
5e70911
ca3eb87
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -504,6 +504,10 @@ bool SettingsLoader::FixupUserSettings() | |
fixedUp = true; | ||
} | ||
|
||
// we need to generate an ID for a command in the user settings if it doesn't already have one | ||
auto actionMap{ winrt::get_self<ActionMap>(userSettings.globals->ActionMap()) }; | ||
fixedUp = actionMap->GenerateIDsForActions() || fixedUp; | ||
Comment on lines
+507
to
+509
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we aren't actually using these IDs yet, this could definitely be moved into the follow up PR that is actually going to refactor our maps to use the new IDs. However then that leaves this PR as just "adding an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nah this is great |
||
|
||
return fixedUp; | ||
} | ||
|
||
|
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.
These IDs are very similar to our
InternalActionID
except instead of also hashing theShortcutAction
, we only hash theArgs
and we leave theShortcutAction
as a string. Since these will end up in the user file, I prefer this as it will be more readableThere 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.
this is clever, thanks!