terminal/src/cascadia/TerminalSettingsModel
Carlos Zamora 9700598ecb
Bugfix: sync color scheme rename with profile reference (#8793)
## Summary of the Pull Request
This fixes a bug where renaming/deleting a color scheme would not update profiles that referenced it.

This also adds detection for renaming a color scheme to a name that is already in use, and adds appropriate UI for that.

## References
#6800 - Settings UI Epic

## PR Checklist
* [X] Closes #8756 

## Detailed Description of the Pull Request / Additional comments
`Model::CascadiaSettings` was updated to have a `UpdateColorSchemeReferences()` function that updates all profiles referencing the newly renamed color scheme.

`Editor::ColorSchemesPageNavigationState` now takes and exposes a `Model::CascadiaSettings`.

When a color scheme is renamed or deleted, we use `CascadiaSettings` to update our list of color schemes appropriately, then call `UpdateColorSchemeReferences()` to update the profiles.

The tricky part is that `Profile` does not store a direct reference to `ColorScheme`, but rather the name of the color scheme. See [this tread](https://github.com/microsoft/terminal/issues/8756#issuecomment-760375027) for a discussion on this topic.

## Validation Steps Performed
Repro steps from #8756 when renaming/deleting a referenced color scheme.

## Demo
![Scheme Name Already In Use Demo](https://user-images.githubusercontent.com/11050425/105431427-6e023980-5c0a-11eb-894a-42152fc77f05.gif)
2021-01-22 18:21:18 +00:00
..
dll Fix the duplicate .xbf error after a TerminalControl build (#8754) 2021-01-13 01:23:17 +00:00
Resources/en-US Polish OpenSettings action for Settings UI and Profile page navigation on refresh (#8670) 2021-01-04 14:14:51 -08:00
ActionAndArgs.cpp Implement user-specified pixel shaders, redux (#8565) 2020-12-15 20:40:22 +00:00
ActionAndArgs.h Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
ActionArgs.cpp Polish OpenSettings action for Settings UI and Profile page navigation on refresh (#8670) 2021-01-04 14:14:51 -08:00
ActionArgs.h Polish OpenSettings action for Settings UI and Profile page navigation on refresh (#8670) 2021-01-04 14:14:51 -08:00
ActionArgs.idl Polish OpenSettings action for Settings UI and Profile page navigation on refresh (#8670) 2021-01-04 14:14:51 -08:00
AzureCloudShellGenerator.cpp Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
AzureCloudShellGenerator.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
CascadiaSettings.cpp Bugfix: sync color scheme rename with profile reference (#8793) 2021-01-22 18:21:18 +00:00
CascadiaSettings.h Bugfix: sync color scheme rename with profile reference (#8793) 2021-01-22 18:21:18 +00:00
CascadiaSettings.idl Bugfix: sync color scheme rename with profile reference (#8793) 2021-01-22 18:21:18 +00:00
CascadiaSettingsSerialization.cpp Fix deserialization failure message of combined types (#8558) 2020-12-15 11:33:52 -08:00
ColorScheme.cpp Add UI for adding, renaming, and deleting a color scheme (#8403) 2020-12-17 23:14:07 +00:00
ColorScheme.h Add UI for adding, renaming, and deleting a color scheme (#8403) 2020-12-17 23:14:07 +00:00
ColorScheme.idl Add UI for adding, renaming, and deleting a color scheme (#8403) 2020-12-17 23:14:07 +00:00
Command.cpp Implement CascadiaSettings::Copy() (#7877) 2020-10-16 15:14:11 -07:00
Command.h Change backslashes in include statements to forward slashes (#8205) 2020-11-25 21:02:10 +00:00
Command.idl Introduce IconConverter (#7830) 2020-10-08 11:29:04 -07:00
DefaultProfileUtils.cpp Make Global and Profile settings inheritable (#7923) 2020-10-27 17:35:09 +00:00
DefaultProfileUtils.h Make Global and Profile settings inheritable (#7923) 2020-10-27 17:35:09 +00:00
defaults-universal.json Implement user-specified pixel shaders, redux (#8565) 2020-12-15 20:40:22 +00:00
defaults.json Introduce startupActions in settings (#8770) 2021-01-15 18:30:11 +00:00
EnumMappings.cpp Add missing settings to the settings UI (#8774) 2021-01-14 23:57:59 +00:00
EnumMappings.h Add missing settings to the settings UI (#8774) 2021-01-14 23:57:59 +00:00
EnumMappings.idl Add missing settings to the settings UI (#8774) 2021-01-14 23:57:59 +00:00
GlobalAppSettings.cpp Introduce startupActions in settings (#8770) 2021-01-15 18:30:11 +00:00
GlobalAppSettings.h Introduce startupActions in settings (#8770) 2021-01-15 18:30:11 +00:00
GlobalAppSettings.idl Introduce startupActions in settings (#8770) 2021-01-15 18:30:11 +00:00
IconPathConverter.cpp Move IconSourceConverter from TerminalApp to TSM 2020-12-11 13:17:22 -08:00
IconPathConverter.h Move IconSourceConverter from TerminalApp to TSM 2020-12-11 13:17:22 -08:00
IconPathConverter.idl Move IconSourceConverter from TerminalApp to TSM 2020-12-11 13:17:22 -08:00
IDynamicProfileGenerator.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
IInheritable.h Rework JsonUtils' optional handling to let Converters see null (#8175) 2020-11-09 15:13:02 -08:00
init.cpp Hook up the WIL fallback error tracer in Terminal (#7864) 2020-10-09 22:20:12 +00:00
JsonUtils.h Fix deserialization failure message of combined types (#8558) 2020-12-15 11:33:52 -08:00
KeyChordSerialization.cpp Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
KeyChordSerialization.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
KeyChordSerialization.idl Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
KeyMapping.cpp Teach flyouts and palette to prefer user bindings over defaults (#8725) 2021-01-12 20:23:40 +00:00
KeyMapping.h Teach flyouts and palette to prefer user bindings over defaults (#8725) 2021-01-12 20:23:40 +00:00
KeyMapping.idl Implement user-specified pixel shaders, redux (#8565) 2020-12-15 20:40:22 +00:00
KeyMappingSerialization.cpp Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
LegacyProfileGeneratorNamespaces.h From orbit, nuke the Telnet connection and all supporting infra. (#7840) 2020-10-09 18:59:58 +00:00
Microsoft.Terminal.Settings.ModelLib.vcxproj Introduce public enum name<->value mappings to TSM 2020-12-11 13:19:03 -08:00
Microsoft.Terminal.Settings.ModelLib.vcxproj.filters Introduce public enum name<->value mappings to TSM 2020-12-11 13:19:03 -08:00
packages.config Update C++/WinRT to 2.0.201017.1 (#8061) 2020-10-27 20:15:30 +00:00
pch.cpp Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
pch.h Move IconSourceConverter from TerminalApp to TSM 2020-12-11 13:17:22 -08:00
PowershellCoreProfileGenerator.cpp Introduce IconConverter (#7830) 2020-10-08 11:29:04 -07:00
PowershellCoreProfileGenerator.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
Profile.cpp Implement user-specified pixel shaders, redux (#8565) 2020-12-15 20:40:22 +00:00
Profile.h Implement user-specified pixel shaders, redux (#8565) 2020-12-15 20:40:22 +00:00
Profile.idl Implement user-specified pixel shaders, redux (#8565) 2020-12-15 20:40:22 +00:00
SettingsTypes.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
TerminalSettingsSerializationHelpers.h Add doubleUnderscore cursor style (#7827) 2021-01-20 19:36:07 +00:00
TerminalWarnings.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
TerminalWarnings.idl Introduce startupActions in settings (#8770) 2021-01-15 18:30:11 +00:00
userDefaults.json Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
WslDistroGenerator.cpp Introduce IconConverter (#7830) 2020-10-08 11:29:04 -07:00
WslDistroGenerator.h Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00