mirror of
https://github.com/microsoft/terminal.git
synced 2026-04-11 00:31:11 +00:00
Bugfix: allow refreshed profile page to be deleted
This commit is contained in:
@@ -104,13 +104,13 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
{
|
||||
if (const auto tag{ selectedItem.as<MUX::Controls::NavigationViewItem>().Tag() })
|
||||
{
|
||||
if (const auto profile{ tag.try_as<Model::Profile>() })
|
||||
if (const auto oldProfile{ tag.try_as<Model::Profile>() })
|
||||
{
|
||||
// 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<Editor::Profiles>(), winrt::make<ProfilePageNavigationState>(_viewModelForProfile(profile), _settingsClone.GlobalSettings().ColorSchemes(), *this));
|
||||
_Navigate(_viewModelForProfile(profile));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user