terminal/src/cascadia
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
..
CascadiaPackage make "open terminal here" context menu work for directory background (#8638) 2021-01-06 19:59:30 +00:00
inc Polish the Background Image settings (#8778) 2021-01-18 22:34:07 +00:00
LocalTests_SettingsModel Add size param to splitPane action, split-pane subcommand (#8543) 2020-12-18 03:51:53 +00:00
LocalTests_TerminalApp Reset the size param between split-pane subcommands (#8753) 2021-01-12 23:19:55 +00:00
PublicTerminalCore Exclude more rarely-used stuff from Windows headers (#8513) 2020-12-11 19:35:23 +00:00
Remoting Add Microsoft.Terminal.Remoting.dll (#8607) 2021-01-07 22:59:37 +00:00
ShellExtension make "open terminal here" context menu work for directory background (#8638) 2021-01-06 19:59:30 +00:00
TerminalApp Teach terminal to hide mouse while typing (#8629) 2021-01-21 01:17:59 +00:00
TerminalAzBridge Exclude more rarely-used stuff from Windows headers (#8513) 2020-12-11 19:35:23 +00:00
TerminalConnection make "open terminal here" context menu work for directory background (#8638) 2021-01-06 19:59:30 +00:00
TerminalControl Teach terminal to hide mouse while typing (#8629) 2021-01-21 01:17:59 +00:00
TerminalCore Add skeleton code for bracketed paste mode (#8840) 2021-01-22 05:11:11 +00:00
TerminalSettingsEditor Bugfix: sync color scheme rename with profile reference (#8793) 2021-01-22 18:21:18 +00:00
TerminalSettingsModel Bugfix: sync color scheme rename with profile reference (#8793) 2021-01-22 18:21:18 +00:00
UnitTests_Remoting Add Microsoft.Terminal.Remoting.dll (#8607) 2021-01-07 22:59:37 +00:00
UnitTests_TerminalCore ROW: clean up in preparation to hide CharRow & AttrRow (#8446) 2021-01-20 21:16:56 +00:00
ut_app Update to Microsoft.UI.Xaml 2.5 "stable" (#8500) 2020-12-04 23:49:45 +00:00
WindowsTerminal Add Microsoft.Terminal.Remoting.dll (#8607) 2021-01-07 22:59:37 +00:00
WindowsTerminalUniversal Update Win32 Toolkit (6.1.2) and VCRT Forwarders (1.0.4) (#8501) 2020-12-10 01:30:00 +00:00
WinRTUtils Exclude more rarely-used stuff from Windows headers (#8513) 2020-12-11 19:35:23 +00:00
WpfTerminalControl Added negative value check for resize newsize (#8792) 2021-01-15 17:48:14 +00:00
WpfTerminalTestNetCore wpf: target netcoreapp3.1, clean up test project path (#8491) 2020-12-04 18:17:25 +00:00
wt Build and ship an actual binary named wt that just launches WT (#6860) 2020-07-10 22:41:37 +00:00
CascadiaResources.build.items Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00