enhance: only raise BlockNavigationChangedEvent when UseBlockNavigation enabled

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-03-21 18:00:46 +08:00
parent 9590f96a44
commit d335cac167
No known key found for this signature in database
2 changed files with 12 additions and 6 deletions

View file

@ -37,7 +37,7 @@ namespace SourceGit.Views
private void OnBlockNavigationChanged(object sender, RoutedEventArgs e)
{
if (sender is TextDiffView { UseBlockNavigation: true } textDiff)
if (sender is TextDiffView textDiff)
BlockNavigationIndicator.Text = textDiff.BlockNavigation?.Indicator ?? string.Empty;
}
}