From 666a75bc7027e5dec4f33e395340741cfc30c4bb Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Tue, 5 Aug 2025 16:18:43 -0500 Subject: [PATCH] Fix hot reload for icon, bell, close on exit; regressed in #16172 (#19217) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/cascadia/TerminalApp/TerminalPaneContent.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cascadia/TerminalApp/TerminalPaneContent.cpp b/src/cascadia/TerminalApp/TerminalPaneContent.cpp index 5d5e32ed69..002e4f026c 100644 --- a/src/cascadia/TerminalApp/TerminalPaneContent.cpp +++ b/src/cascadia/TerminalApp/TerminalPaneContent.cpp @@ -340,8 +340,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());