@@ -1746,25 +1746,25 @@ public TextDiffView()
1746
1746
public void GotoFirstChange ( )
1747
1747
{
1748
1748
this . FindDescendantOfType < ThemedTextDiffPresenter > ( ) ? . GotoFirstChange ( ) ;
1749
- RaiseEvent ( new RoutedEventArgs ( BlockNavigationChangedEvent ) ) ;
1749
+ TryRaiseBlockNavigationChanged ( ) ;
1750
1750
}
1751
1751
1752
1752
public void GotoPrevChange ( )
1753
1753
{
1754
1754
this . FindDescendantOfType < ThemedTextDiffPresenter > ( ) ? . GotoPrevChange ( ) ;
1755
- RaiseEvent ( new RoutedEventArgs ( BlockNavigationChangedEvent ) ) ;
1755
+ TryRaiseBlockNavigationChanged ( ) ;
1756
1756
}
1757
1757
1758
1758
public void GotoNextChange ( )
1759
1759
{
1760
1760
this . FindDescendantOfType < ThemedTextDiffPresenter > ( ) ? . GotoNextChange ( ) ;
1761
- RaiseEvent ( new RoutedEventArgs ( BlockNavigationChangedEvent ) ) ;
1761
+ TryRaiseBlockNavigationChanged ( ) ;
1762
1762
}
1763
1763
1764
1764
public void GotoLastChange ( )
1765
1765
{
1766
1766
this . FindDescendantOfType < ThemedTextDiffPresenter > ( ) ? . GotoLastChange ( ) ;
1767
- RaiseEvent ( new RoutedEventArgs ( BlockNavigationChangedEvent ) ) ;
1767
+ TryRaiseBlockNavigationChanged ( ) ;
1768
1768
}
1769
1769
1770
1770
protected override void OnDataContextChanged ( EventArgs e )
@@ -1818,7 +1818,7 @@ private void RefreshBlockNavigation()
1818
1818
else
1819
1819
BlockNavigation = null ;
1820
1820
1821
- RaiseEvent ( new RoutedEventArgs ( BlockNavigationChangedEvent ) ) ;
1821
+ TryRaiseBlockNavigationChanged ( ) ;
1822
1822
}
1823
1823
1824
1824
private void OnStageChunk ( object _1 , RoutedEventArgs _2 )
@@ -1990,5 +1990,11 @@ private void OnDiscardChunk(object _1, RoutedEventArgs _2)
1990
1990
repo . MarkWorkingCopyDirtyManually ( ) ;
1991
1991
repo . SetWatcherEnabled ( true ) ;
1992
1992
}
1993
+
1994
+ private void TryRaiseBlockNavigationChanged ( )
1995
+ {
1996
+ if ( UseBlockNavigation )
1997
+ RaiseEvent ( new RoutedEventArgs ( BlockNavigationChangedEvent ) ) ;
1998
+ }
1993
1999
}
1994
2000
}
0 commit comments