Skip to content

Commit

Permalink
Properly cast NavViewItem Profile tags
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-zamora committed Dec 29, 2020
1 parent ff84ee9 commit 9fea6de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cascadia/TerminalSettingsEditor/MainPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
if (const auto tag{ navViewItem.Tag() })
{
if (tag.try_as<Model::Profile>())
if (tag.try_as<Editor::ProfileViewModel>())
{
// hide NavViewItem pointing to a Profile
navViewItem.Visibility(Visibility::Collapsed);
Expand Down Expand Up @@ -104,7 +104,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
if (const auto tag{ selectedItem.as<MUX::Controls::NavigationViewItem>().Tag() })
{
if (const auto oldProfile{ tag.try_as<Model::Profile>() })
if (const auto oldProfile{ tag.try_as<Editor::ProfileViewModel>() })
{
// check if the profile still exists
if (const auto profile{ _settingsClone.FindProfile(oldProfile.Guid()) })
Expand Down

0 comments on commit 9fea6de

Please sign in to comment.