Fix hot reload for icon, bell, close on exit; regressed in #16172 (#19217)

In #16172, we removed the propagation of the profile down into the
Terminal Pane Content.

It was holding on to the profile from the _old_ settings model (😱).

This also broke background image hot reload.

(cherry picked from commit 666a75bc7027e5dec4f33e395340741cfc30c4bb)
Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgdVVHA
Service-Version: 1.23
This commit is contained in:
Dustin L. Howett 2025-08-05 16:18:43 -05:00 committed by Dustin L. Howett
parent 34cd29a0ce
commit 9449d0b29e

View File

@ -339,8 +339,12 @@ namespace winrt::TerminalApp::implementation
RestartTerminalRequested.raise(*this, nullptr);
}
void TerminalPaneContent::UpdateSettings(const CascadiaSettings& /*settings*/)
void TerminalPaneContent::UpdateSettings(const CascadiaSettings& settings)
{
// Reload our profile from the settings model to propagate bell mode, icon, and close on exit mode (anything that uses _profile).
const auto profile{ settings.FindProfile(_profile.Guid()) };
_profile = profile ? profile : settings.ProfileDefaults();
if (const auto& settings{ _cache.TryLookup(_profile) })
{
_control.UpdateControlSettings(settings.DefaultSettings(), settings.UnfocusedSettings());