mirror of
https://github.com/microsoft/terminal.git
synced 2026-04-08 07:11:08 +00:00
Prevent navigation to already selected menu item
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user