Skip to content

Commit

Permalink
Prevent navigation to already selected menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-zamora committed Jan 13, 2021
1 parent 0021214 commit 9283375
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/cascadia/TerminalSettingsEditor/MainPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
{
if (const auto clickedItemContainer = args.InvokedItemContainer())
{
if (clickedItemContainer.IsSelected())
{
// Clicked on the selected item.
// Don't navigate to the same page again.
return;
}

if (const auto navString = clickedItemContainer.Tag().try_as<hstring>())
{
if (navString == addProfileTag)
Expand Down

0 comments on commit 9283375

Please sign in to comment.