Browse Source
Merge pull request #6146 from FoggyFinder/issue6127
Prevent `ScrollSlotIntoView` from crashing on start
pull/6175/head
Jumar Macato
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/Avalonia.Controls.DataGrid/DataGridRows.cs
|
|
|
@ -425,7 +425,7 @@ namespace Avalonia.Controls |
|
|
|
UpdateDisplayedRows(DisplayData.FirstScrollingSlot, CellsHeight); |
|
|
|
} |
|
|
|
|
|
|
|
if (DisplayData.FirstScrollingSlot < slot && DisplayData.LastScrollingSlot > slot) |
|
|
|
if (DisplayData.FirstScrollingSlot < slot && (DisplayData.LastScrollingSlot > slot || DisplayData.LastScrollingSlot == -1)) |
|
|
|
{ |
|
|
|
// The row is already displayed in its entirety
|
|
|
|
return true; |
|
|
|
|