@@ -1746,25 +1746,25 @@ public TextDiffView()
17461746 public void GotoFirstChange ( )
17471747 {
17481748 this . FindDescendantOfType < ThemedTextDiffPresenter > ( ) ? . GotoFirstChange ( ) ;
1749- RaiseEvent ( new RoutedEventArgs ( BlockNavigationChangedEvent ) ) ;
1749+ TryRaiseBlockNavigationChanged ( ) ;
17501750 }
17511751
17521752 public void GotoPrevChange ( )
17531753 {
17541754 this . FindDescendantOfType < ThemedTextDiffPresenter > ( ) ? . GotoPrevChange ( ) ;
1755- RaiseEvent ( new RoutedEventArgs ( BlockNavigationChangedEvent ) ) ;
1755+ TryRaiseBlockNavigationChanged ( ) ;
17561756 }
17571757
17581758 public void GotoNextChange ( )
17591759 {
17601760 this . FindDescendantOfType < ThemedTextDiffPresenter > ( ) ? . GotoNextChange ( ) ;
1761- RaiseEvent ( new RoutedEventArgs ( BlockNavigationChangedEvent ) ) ;
1761+ TryRaiseBlockNavigationChanged ( ) ;
17621762 }
17631763
17641764 public void GotoLastChange ( )
17651765 {
17661766 this . FindDescendantOfType < ThemedTextDiffPresenter > ( ) ? . GotoLastChange ( ) ;
1767- RaiseEvent ( new RoutedEventArgs ( BlockNavigationChangedEvent ) ) ;
1767+ TryRaiseBlockNavigationChanged ( ) ;
17681768 }
17691769
17701770 protected override void OnDataContextChanged ( EventArgs e )
@@ -1818,7 +1818,7 @@ private void RefreshBlockNavigation()
18181818 else
18191819 BlockNavigation = null ;
18201820
1821- RaiseEvent ( new RoutedEventArgs ( BlockNavigationChangedEvent ) ) ;
1821+ TryRaiseBlockNavigationChanged ( ) ;
18221822 }
18231823
18241824 private void OnStageChunk ( object _1 , RoutedEventArgs _2 )
@@ -1990,5 +1990,11 @@ private void OnDiscardChunk(object _1, RoutedEventArgs _2)
19901990 repo . MarkWorkingCopyDirtyManually ( ) ;
19911991 repo . SetWatcherEnabled ( true ) ;
19921992 }
1993+
1994+ private void TryRaiseBlockNavigationChanged ( )
1995+ {
1996+ if ( UseBlockNavigation )
1997+ RaiseEvent ( new RoutedEventArgs ( BlockNavigationChangedEvent ) ) ;
1998+ }
19931999 }
19942000}
0 commit comments