Prevent navigation to already selected menu item

This commit is contained in:
Carlos Zamora 2021-01-12 17:51:05 -08:00
parent 00212142ea
commit 92833757c6

View file

@ -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)