Browse Source
Merge branch 'master' into fixes/win32-window-sizing-extended-client-area
pull/5622/head
Dariusz Komosiński
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
9 additions and
2 deletions
-
src/Avalonia.Controls.DataGrid/Collections/DataGridCollectionView.cs
|
|
|
@ -3275,7 +3275,7 @@ namespace Avalonia.Collections |
|
|
|
addIndex); |
|
|
|
|
|
|
|
// next check if we need to add an item into the current group
|
|
|
|
// bool needsGrouping = false;
|
|
|
|
bool needsGrouping = false; |
|
|
|
if (Count == 1 && GroupDescriptions.Count > 0) |
|
|
|
{ |
|
|
|
// if this is the first item being added
|
|
|
|
@ -3302,7 +3302,7 @@ namespace Avalonia.Collections |
|
|
|
// otherwise, we need to validate that it is within the current page.
|
|
|
|
if (PageSize == 0 || (PageIndex + 1) * PageSize > leafIndex) |
|
|
|
{ |
|
|
|
//needsGrouping = true;
|
|
|
|
needsGrouping = true; |
|
|
|
|
|
|
|
int pageStartIndex = PageIndex * PageSize; |
|
|
|
|
|
|
|
@ -3340,6 +3340,13 @@ namespace Avalonia.Collections |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// if we need to add the item into the current group
|
|
|
|
// that will be displayed
|
|
|
|
if (needsGrouping) |
|
|
|
{ |
|
|
|
this._group.AddToSubgroups(addedItem, false /*loading*/); |
|
|
|
} |
|
|
|
|
|
|
|
int addedIndex = IndexOf(addedItem); |
|
|
|
|
|
|
|
// if the item is within the current page
|
|
|
|
|