@@ -563,16 +563,12 @@ private void OnCommitListLayoutUpdated(object _1, EventArgs _2)
563563 SetCurrentValue ( IsScrollToTopVisibleProperty , startY >= rowHeight ) ;
564564
565565 var clipWidth = dataGrid . Columns [ 0 ] . ActualWidth - 4 ;
566- if ( Math . Abs ( _lastGraphStartY - startY ) > 0.01 ||
567- Math . Abs ( _lastGraphClipWidth - clipWidth ) > 0.01 ||
568- Math . Abs ( _lastGraphRowHeight - rowHeight ) > 0.01 )
569- {
570- _lastGraphStartY = startY ;
571- _lastGraphClipWidth = clipWidth ;
572- _lastGraphRowHeight = rowHeight ;
573-
566+ var lastLayout = CommitGraph . Layout ;
567+ if ( lastLayout == null ||
568+ Math . Abs ( lastLayout . StartY - startY ) > 0.01 ||
569+ Math . Abs ( lastLayout . ClipWidth - clipWidth ) > 0.01 ||
570+ Math . Abs ( lastLayout . RowHeight - rowHeight ) > 0.01 )
574571 CommitGraph . Layout = new ( startY , clipWidth , rowHeight ) ;
575- }
576572 }
577573
578574 private void OnScrollToTopPointerPressed ( object sender , PointerPressedEventArgs e )
@@ -1657,9 +1653,6 @@ private async Task InteractiveRebaseWithPrefillActionAsync(ViewModels.Repository
16571653 await this . ShowDialogAsync ( new ViewModels . InteractiveRebase ( repo , on , prefill ) ) ;
16581654 }
16591655
1660- private double _lastGraphStartY = 0 ;
1661- private double _lastGraphClipWidth = 0 ;
1662- private double _lastGraphRowHeight = 0 ;
16631656 private bool _resizingAuthorColumn = false ;
16641657 private Cursor _resizingCursor = new Cursor ( StandardCursorType . SizeWestEast ) ;
16651658 }
0 commit comments