Skip to content

Commit

Permalink
Fix: Fixed issue where properties window could not navigate to other …
Browse files Browse the repository at this point in the history
…pages after returning from advanced settings (files-community#15149)
  • Loading branch information
hishitetsu authored Apr 10, 2024
1 parent b641dcb commit ca59398
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public NavigationViewItemButtonStyleItem SelectedNavigationViewItem
get => _SelectedNavigationViewItem;
set
{
if (SetProperty(ref _SelectedNavigationViewItem, value) &&
!_selectionChangedAutomatically)
if (SetProperty(ref _SelectedNavigationViewItem, value))
{
var parameter = new PropertiesPageNavigationParameter
{
Expand All @@ -47,8 +46,6 @@ public NavigationViewItemButtonStyleItem SelectedNavigationViewItem

_mainFrame?.Navigate(page, parameter, new EntranceNavigationTransitionInfo());
}

_selectionChangedAutomatically = false;
}
}

Expand Down Expand Up @@ -85,8 +82,6 @@ public NavigationViewItemButtonStyleItem SelectedNavigationViewItem

private readonly PropertiesPageNavigationParameter _parameter;

private bool _selectionChangedAutomatically { get; set; }

public IRelayCommand DoBackwardNavigationCommand { get; }
public IAsyncRelayCommand SaveChangedPropertiesCommand { get; }
public IRelayCommand CancelChangedPropertiesCommand { get; }
Expand Down Expand Up @@ -120,8 +115,6 @@ private void ExecuteDoBackwardNavigationCommand()

var pageTag = ((Page)_mainFrame.Content).Tag.ToString();

_selectionChangedAutomatically = true;

// Move selection indicator
_SelectedNavigationViewItem =
NavigationViewItems.First(x => string.Equals(x.ItemType.ToString(), pageTag, StringComparison.CurrentCultureIgnoreCase))
Expand Down

0 comments on commit ca59398

Please sign in to comment.