From dd2f3e5b5997422779ee7d693c03e03b862d364e Mon Sep 17 00:00:00 2001 From: Carlos Zamora Date: Sat, 26 Dec 2020 17:56:56 -0600 Subject: [PATCH] Bugfix: allow refreshed profile page to be deleted --- src/cascadia/TerminalSettingsEditor/MainPage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cascadia/TerminalSettingsEditor/MainPage.cpp b/src/cascadia/TerminalSettingsEditor/MainPage.cpp index f2be2710c96..05fd1cd3039 100644 --- a/src/cascadia/TerminalSettingsEditor/MainPage.cpp +++ b/src/cascadia/TerminalSettingsEditor/MainPage.cpp @@ -104,13 +104,13 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation { if (const auto tag{ selectedItem.as().Tag() }) { - if (const auto profile{ tag.try_as() }) + if (const auto oldProfile{ tag.try_as() }) { // check if the profile still exists - if (_settingsClone.FindProfile(profile.Guid())) + if (const auto profile{ _settingsClone.FindProfile(oldProfile.Guid()) }) { // Navigate to the page with the given profile - contentFrame().Navigate(xaml_typename(), winrt::make(_viewModelForProfile(profile), _settingsClone.GlobalSettings().ColorSchemes(), *this)); + _Navigate(_viewModelForProfile(profile)); return; } }