Skip to content

Commit 9449d0b

Browse files
committed
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 666a75b) Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgdVVHA Service-Version: 1.23
1 parent 34cd29a commit 9449d0b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cascadia/TerminalApp/TerminalPaneContent.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,12 @@ namespace winrt::TerminalApp::implementation
339339
RestartTerminalRequested.raise(*this, nullptr);
340340
}
341341

342-
void TerminalPaneContent::UpdateSettings(const CascadiaSettings& /*settings*/)
342+
void TerminalPaneContent::UpdateSettings(const CascadiaSettings& settings)
343343
{
344+
// Reload our profile from the settings model to propagate bell mode, icon, and close on exit mode (anything that uses _profile).
345+
const auto profile{ settings.FindProfile(_profile.Guid()) };
346+
_profile = profile ? profile : settings.ProfileDefaults();
347+
344348
if (const auto& settings{ _cache.TryLookup(_profile) })
345349
{
346350
_control.UpdateControlSettings(settings.DefaultSettings(), settings.UnfocusedSettings());

0 commit comments

Comments
 (0)